zoukankan      html  css  js  c++  java
  • 【译】BMP格式与JPG格式之间的区别

          最近开始学习图形图像方面的知识,我的想法是了解计算机如何加载或显示一张图片,如果后续有可能将会尝试写些代码一步一步加载一张图片。以下文章是本人翻译而成,源地址:http://www.differencebetween.net/technology/difference-between-bmp-and-jpg/ 。翻译水平有限且有省略的地方,有问题欢迎拍砖。

       

    译文:

      BMP和JPG是用于图像文件不同的扩展名,两种图片格式各有优缺点。BMP代指位图(Bitmap),JPG遵循JPEG的标准。BMP图像文件是未经压缩的,而JPG格式的文件是经过压缩的数字图像。BMP格式的文件每个像素都有自己的具体颜色,展示图片详情。因JPG格式的图片是经过压缩的,在这一点上二者不同。这也是BMP格式图片的分辨率高于JPG格式图片的原因。位图文件较适合于有限的颜色,而JPG格式的图片支持多达1600万种颜色。

      与JPG图片相比,BMP图片由于未经压缩占用的空间较大。当图片经过压缩保存为JPG格式时将导致丢失一些不重要信息,在一般情况下你将不会感觉出来。JPG格式的文件具有分析图片中重要信息的能力,由于会给原始图像带来一些无法察觉的改变,所以无法辩论出人类的眼睛,但文件的大小可以降低到原来的1/10甚至1/20。

      JPG文件用于网页中,较BMP文件相比具有较小、便于使用、便于下载等优点。然而在图片处理领域,由于BMP文件包含了所有的图片信息,相比JPG文件具有优势,经常用于图标文件及小的图片中。因为BMP文件的高品质,故便于修改及变更。与之相比,JPG文件舍弃了图像品质换取了极大的扩展能力,这种改变是显而易见的。JPG格式最适用于数码图片中,因为能够产生较高质量的图片且占用空间较小,所以JPG格式被广泛用于数码相机中。

    原文如下:

         

    Difference between BMP and JPG

            BMP and JPG are two different types of file extensions used for graphic files. Both the file formats have their own pros and cons. BMP stands for Bitmap, while JPG follows the standard formulated by the Joint Photographic Experts Group. Graphic files with a BMP format are uncompressed bitmapped images, ant those JPG formats are compressed digital images. In BMP format files, each and every pixel has its own specific color, laying out a detailed map of the picture. This is not the case with the JPG format graphic files, as they are compressed. This is why BMP formatted images have a higher resolution than JPG images. Bitmap formats are well suited for images with limited number of colors, while JPG format graphic files support up to 16 million colors.

             BMP images, because they are uncompressed, are larger in size when compressed to JPG images. This is attributed to the fact that graphic files undergo compression when they are saved in JPG format, and this compression leads to a loss of unimportant information from that image, which is not at all detectable in a normal view. A JPG file format has the capability to analyze which information is important for a particular image. It makes unidentifiable changes to the image, which cannot be distinguished by the human eye, and this reduces the file size to 1/10th or 1/20th of the original file size.

             For using images on the web, JPG images, being smaller in size, are easy to use and can be downloaded faster when compared to the larger sized BMP images. However, when it comes to image processing, BMP format images are preferred over JPG images, as they contain all the image information in a simple format. These are usually used for icons and small sized images. It is also quite easy to edit or make changes to BMP images, because of their high quality, whereas JPG images lose their quality to a greater extent when they are edited, and the changes made are noticeable. JPG format is best for digital photographs. This format is being widely used by digital cameras, as they take less space when producing high quality images.

    Summary:

    1. BMP stands for Bitmap, while JPG follows the standard formulated by the Joint Photographic Experts Group.
    2. BMP format files are uncompressed bitmapped images, while those with a JPG format are compressed digital images.
    3. BMP formatted images have a higher resolution than JPG images.
    4. BMP images are larger in size when compared to JPG images.
    5. JPG images, being easily downloadable, are preferred over BMP images for web use.
    6. BMP images are of a higher quality than JPG images.
  • 相关阅读:
    Android调用系统相机和相册并解决data为空,OOM,图片角度不对的问题
    Android 工作流提交审批填写审批意见PopWindow工具类
    解决ionic安装不上的方法
    nodeJs 报maximum call stack size exceeded js
    命令行运行ionic run android 出现running one or more of the platforms Error
    Ionic run android失败解决方法。
    Android Scrollview嵌套下listView动态加载数据,解决onScrollChanged执行多次数据重复问题
    Android 自定义ListView动态加载数据
    Android ListView显示不同样式的item
    day 43
  • 原文地址:https://www.cnblogs.com/fitel/p/2747768.html
Copyright © 2011-2022 走看看