png jpg gif

As we keep building on old image technology, types of file formats keep piling up, each with their own nuances and uses. JPG, PNG, and GIF have become the most common, but what sets them apart from each other?

随着我们继续使用旧的图像技术,文件格式的类型不断堆积,每种格式都有自己的细微差别和用途。 JPG,PNG和GIF已成为最常见的,但是什么使它们彼此区分开?

These formats have become the most popular because of their compatibility with modern browsers, broadband speeds, and the needs of average users. Join us as we take a detailed look at each format, and cover the strengths and weaknesses of each.

这些格式由于与现代浏览器的兼容性,宽带速度以及普通用户的需求而成为最受欢迎的格式。 加入我们的行列,详细了解每种格式,并介绍每种格式的优缺点。

JPG(联合图像专家组) (JPG (Joint Photographic Experts Group))

JPG was a filetype developed by the Joint Photographic Experts Group (JPEG) to be a standard for professional photographers. Like the method ZIP files use to find redundancies in files to compress data, JPGs compress image data by reducing sections of images to blocks of pixels or “tiles.” JPG compression has the unfortunate side effect of being permanent, however, as the technology for the file was created for storing large photographic image files in surprisingly small spaces, and not for photo editing.

JPG是联合图像专家组(JPEG)开发的文件类型,它是专业摄影师的标准。 就像ZIP文件用于查找文件中的冗余以压缩数据的方法一样,JPG通过将图像的部分缩小为像素块或“平铺”来压缩图像数据。 JPG压缩具有永久性的不幸副作用,因为创建该文件的技术是为了在出乎意料的狭小空间中存储大型照片图像文件,而不是用于照片编辑。

JPGs have become the de facto standard image of the internet because they can be compressed so much. A typical JPG can be compressed at a ratio of anywhere from 2:1 to as high as 100:1, depending on your settings. Particularly back in the days of dial-up internet, JPGs were the only viable way to send image information.

JPG已被压缩,因此它们已成为Internet的事实上的标准图像。 典型的JPG可以2:1到100:1的比例进行压缩,具体取决于您的设置。 尤其是在拨号上网时代,JPG是发送图像信息的唯一可行方法。

However, because of the lossy nature of JPG, it is not an ideal way to store art files. Even the highest quality setting for JPG is compressed, and will change the look of your image, if only slightly. JPG is also not an ideal medium for typography, crisp lines, or even photographs with sharp edges, as they are often blurred or smeared out by anti-aliasing. What is potentially worse, is that this loss can accumulate—saving multiple versions of artwork can cause degradation with every save. Even so, it is common to see these things saved as JPG, simply because the filetype is so ubiquitous.

但是,由于JPG的有损性质,它不是存储艺术文件的理想方法。 甚至JPG的最高质量设置也会被压缩,并且即使只是很小的改变也会改变图像的外观。 JPG也不是用于排版 ,线条清晰甚至边缘清晰的照片的理想介质,因为它们经常会因抗锯齿而变得模糊或模糊。 更糟的是,这种损失会累积起来—保存多个版本的艺术品会在每次保存时导致性能下降。 即使这样,也经常将这些内容另存为JPG,这仅仅是因为文件类型如此普遍。

Close up of a high quality JPG.
关闭高质量JPG。

Close up of a very lossy JPG.
关闭非常有损的JPG。

The Joint Photographic Experts Group developed lossless JPG technology to combat this serious problem of quality degradation. However, because of dial-up speeds and general lack of interest in high quality non-degrading files, the JPG-LS standard never caught on.

联合图像专家组开发了无损JPG技术,以解决质量下降这一严重问题。 但是,由于拨号速度和对高质量非降级文件的普遍兴趣,因此JPG-LS标准从未流行。

It is possible to download plugins that allow users to open and save the lossless JPG2000, and some programs, like Apple’s Preview application, can read and save JPG2000 directly out of the box.

可以下载允许用户打开和保存无损JPG2000的插件,并且某些程序(例如Apple的Preview应用程序)可以直接读取和保存JPG2000。

JPGs support 24-bit RGB and CMYK, as well as 8-bit Grayscale. I personally do not recommend using CMYK color spaces in JPGs. It’s also important to note that Grayscale JPGs do not compress nearly as much as color ones do.

JPG支持24位RGB和CMYK,以及8位灰度。 我个人不建议在JPG中使用CMYK颜色空间。 同样重要的是要注意,灰度JPG的压缩程度不如彩色JPG。

GIF(图形交换格式) (GIF (Graphics Interchange Format))

GIF, like JPG, is an older filetype, and one generally associated with the internet as opposed to photography. GIF stands for “Graphics Interchange Format” and employs the same lossless LZW compression that TIFF images use. This technology was once controversial (for patent enforcement issues) but has become an accepted format since all patents have expired.

与JPG一样,GIF是一种较旧的文件类型,通常与互联网相关联而不是与摄影相关。 GIF代表“图形交换格式”,并采用与TIFF图像相同的无损LZW压缩。 这项技术曾经引起争议( 涉及专利执行问题 ),但由于所有专利都已过期,因此已成为一种公认的格式。

Close up of an 8-bit color GIF.
关闭一个8位彩色GIF。

GIF is by nature an 8-bit color file, meaning they are limited to a palette of 256 colors, which can be picked from the RGB color model and saved to a Color Look Up Table (CLUT), or simply “Color Table.” There are, however, standard color palettes, like the “Web Safe” palette. An important note is that Grayscale images are by nature an 8-bit palette, so saving them as GIF is fairly ideal.

GIF本质上是一个8位颜色文件,这意味着它们仅限于256种颜色的调色板,可以从RGB颜色模型中进行选择,然后保存到颜色查找表(CLUT)或简称为“颜色表”中。 但是,有一些标准的调色板,例如“ Web Safe”调色板。 重要说明是,灰度图像本质上是8位调色板,因此将它们另存为GIF是非常理想的。

Apart from support for transparency, GIF also is supports animations, limiting every frame to 256 preselected colors.

除了支持透明度外,GIF还支持动画,将每帧限制为256种预选颜色。

While GIF is not lossy like JPG, conversion to 8-bit color distorts many images, using dither filters to optically blend, or “diffuse,” colors, similar to halftone dots or pointilism. This can radically alter an image for the worse, or, in some cases, be used to create an interesting effect.

尽管GIF不会像JPG那样有损,但转换为8位颜色会使许多图像失真,使用抖动滤镜对颜色进行光学融合或“漫射”,类似于半色调点或点 画质 。 这可能会从根本上改变图像的质量,或者在某些情况下会产生有趣的效果 。

Because of this non-lossy format, GIF can be used to keep tight lines on typography and geometric shapes, although these things are better suited to vector graphic files like SVG or the Adobe Illustrator native format, AI.

由于这种无损格式,GIF可以用于使字体和几何形状保持紧密线条,尽管这些东西更适合于SVG或Adobe Illustrator本机格式AI之类的矢量图形文件。

GIF is not ideal for modern photography, nor image storage. At small sizes with very limited color tables, GIF images can be smaller than JPG files. But at most ordinary sizes, JPG compression will create a smaller image. They are largely out of date, useful only to create dancing babies or to sometimes create rough transparencies.

GIF不是现代摄影的理想选择,也不是图像存储的理想选择。 在颜色表非常有限的小尺寸情况下,GIF图像可以小于JPG文件。 但以大多数普通大小而言,JPG压缩将创建较小的图像。 它们在很大程度上已经过时了,仅对创建跳舞的婴儿或有时创建粗糙的透明胶片有用。

PNG(便携式网络图形) (PNG (Portable Network Graphics))

PNG stands for Portable Network Graphics (or, depending on whom you ask, the recursive “PNG-Not-GIF”). It was developed as an open alternative to GIF, which used the proprietary LZW compression algorithm discussed earlier. PNG is an excellent filetype for internet graphics, as it supports transparency in browsers with an elegance that GIF does not possess. Notice how the transparent color changes and blends with the background. Right-click the image to see. This is actually one image that is on four different background colors.

PNG代表可移植网络图形(或根据您的要求,递归“ PNG-Not-GIF”)。 它被开发为GIF的开放替代方案,GIF使用了前面讨论的专有LZW压缩算法。 PNG是Internet图形的出色文件类型,因为它以GIF不具备的优雅风格支持浏览器的透明性。 注意透明颜色如何变化并与背景融合。 右键单击图像以查看。 这实际上是一张具有四种不同背景颜色的图像。

PNG supports 8-bit color like GIF, but also supports 24-bit color RGB, like JPG does. They are also non-lossy files, compressing photographic images without degrading image quality. PNG tends to be the biggest of the three filetypes and isn’t supported by some (usually older) browsers.

PNG支持8位颜色(如GIF),但也支持24位颜色RGB(如JPG)。 它们也是无损文件,可压缩摄影图像而不会降低图像质量。 PNG往往是这三种文件类型中最大的一种,某些(通常是较旧的)浏览器不支持PNG。

In addition to being an excellent format for transparency, the non-lossy nature of 24-bit PNG is ideal for screenshot software, allowing pixel for pixel reproduction of your desktop environment.

除了是一种出色的透明格式外,24位PNG的无损特性也是屏幕截图软件的理想选择,它允许像素再现桌面环境中的像素。

使用哪个? (Which to use?)

From left to right, these files are: 24-bit JPG Compressed, 8-bit GIF, 8-bit PNG, Full Quality 24-bit JPG, and 24-bit PNG. Note that the file sizes increase in this same direction.

从左到右,这些文件是:24位JPG压缩文件,8位GIF,8位PNG,全质量24位JPG和24位PNG。 请注意,文件大小沿相同方向增加。

PNG is the largest image type for bigger images, often containing information you may or may not find useful, depending on your needs. 8-bit PNG is an option, but GIF is smaller. Neither are optimal options for photography, as JPG is much smaller than lossless PNG with only minimal loss of quality. And for storage of high resolution files, JPG compresses to tiny proportions, with quality loss only visible on close inspection.

对于较大的图像,PNG是最大的图像类型,通常包含您可能会或可能不会有用的信息,具体取决于您的需求。 可以选择8位PNG,但GIF较小。 两者都不是摄影的最佳选择,因为JPG比无损PNG小得多,而质量损失很小。 对于存储高分辨率文件,JPG压缩到很小的比例,只有在仔细检查时才能看到质量损失。

In short:

简而言之:

  • PNG is good option for transparency and non-lossy, smaller files. Larger files, not so much, unless you demand non-lossy images.对于透明和无损较小的文件,PNG是不错的选择。 更大的文件,不是很多,除非您需要非损耗的图像。
  • GIF is largely a novelty and only useful for animation, but can produce small 8-bit images.GIF在很大程度上是新颖的,仅对动画有用,但可以生成小的8位图像。
  • JPG is still the king for photographs and photo-like images on the internet, but be careful, as your file can degrade with every save.JPG仍然是互联网上照片和类似照片的图片的王者,但请注意,因为每次保存都会降低文件质量。

Image of Keizersgracht, in Amsterdam by Massimo Catarinella via Wikipedia, released under Creative Commons license. Derivative images available under the same license. I don’t care to know who created the dancing baby.

皇帝运河,在阿姆斯特丹的图像 马西莫Catarinella 通过 维基百科 ,下发布的 Creative Commons许可 在相同许可下可用的衍生图像。 我不在乎谁创造了跳舞的婴儿。

翻译自: https://www.howtogeek.com/howto/30941/whats-the-difference-between-jpg-png-and-gif/

png jpg gif

png jpg gif_JPG,PNG和GIF有什么区别?相关推荐

  1. HTML_Hypertext Marked Language

    HTML英语意思是:Hypertext Marked Language,即超文本标记语言,是一种用来制作超文本文档的简单标记语言.用HTML编写的超文本文档称为HTML文档,它能独立于各种操作系统平台 ...

  2. golang通过RSA算法生成token,go从配置文件中注入密钥文件,go从文件中读取密钥文件,go RSA算法下token生成与解析;go java token共用

    RSA算法 token生成与解析 本文演示两种方式,一种是把密钥文件放在配置文件中,一种是把密钥文件本身放入项目或者容器中. 下面两种的区别在于私钥公钥的初始化, init方法,需要哪种取哪种. 通过 ...

  3. 使用Maven打包生成的-SNAPSHOT.jar与-RELEASE.jar分别代表什么?SNAPSHOT是什么意思?RELEASE是什么意思?

    使用Maven打包后生成 XXXXXXX-1.0.0-SNAPSHOT.jar 和 XXXXXXX-1.0.0-RELEASE.jar 的区别???? 首先,根本原因:这是因为你的pom.xml中的项 ...

  4. docker镜像的备份和恢复

    在使用docker的时候总会出现这种情况:下载东西很慢很慢,下载完配置完以后,突然,一个地方配置出现了问题,无法恢复,需要重新装载,那么,之前的所有配置.安装.下载都没了,又是一个大活~ 该怎么办呢? ...

  5. UUID的使用及其原理

    今天敲项目要用UUID,想起之前老师告诉UUID的使用,但没说具体的生成逻辑,于是我进行了百度 首先,UUID的使用: //生成随机的UUID String uuid = UUID.randomUUI ...

  6. CentOS Docker安装配置部署Golang web helloworld

    目录[阅读时间:约5分钟] 一.Docker简介 二.Docker的安装与配置[CentOS环境] 三.Docker部署Golang web helloworld 四.Docker与虚拟机的区别 五. ...

  7. 基于Golang的CLI 命令行程序开发

    基于Golang的CLI 命令行程序开发 [阅读时间:约15分钟] 一. CLI 命令行程序概述 二. 系统环境&项目介绍&开发准备 1.系统环境 2.项目介绍 3.开发准备 三.具体 ...

  8. 中级实训第一天的自学报告

    目录[阅读时间:约10分钟] 中级实训第一天的自学报告 姓名:隐藏敏感信息 学号:隐藏敏感信息 一.Vi/Vim 二.Java 三.Ant 四.Junit [附加]五.SonarQube [附加]六. ...

  9. Go语言的错误异常处理机制及其应用

    一.背景 在日常编写golang程序或阅读别人的golang代码时,我们总会看到如下的一堆代码块: xx, err = func(xx) if err != nil {//do sth. to tac ...

最新文章

  1. poj3264(ST表模版)
  2. 我确实不知道如何使用计算机,【图片】从零开始的计算机教程:看不懂我就打死你【红石电路吧】_百度贴吧...
  3. Nova — 虚拟机密码修改
  4. [力扣leetcode319]灯泡问题
  5. 24 PP配置-生产车间控制-定义工单号码范围
  6. python语言网课答案_Python语言答案
  7. beginnersbook C++ 教程·翻译完成 | ApacheCN
  8. json字符串使用注意问题
  9. Ext 中使用Ajax
  10. cocos2d-x之SimpleGame分析
  11. markdown来写API接口文档
  12. 用keil5将程序下载到板子里
  13. 01.Dem数据提取高程
  14. 如果命运是一条孤独的河流,谁会是你的灵魂摆渡人
  15. Dubbo实现分布式架构原理
  16. matlab非线性超定方程组求代数解,非线性超定方程组求解
  17. AVI视频文件损坏修复
  18. 如何将HTML与win10桌面壁纸,Win10默认桌面背景怎么设置
  19. PVE使用USB蓝牙直通配置
  20. uniapp长按识别二维码、小程序码

热门文章

  1. Android学习笔记 56. TabLayout 选项卡布局
  2. CA周记 - Build 2022 上开发者最应关注的七大方向主要技术更新
  3. 博客园SimpleMemory皮肤的页面美化--感谢BNDong大佬
  4. 各种游戏素材的寻找方法
  5. 矩阵的等价、相似、合同
  6. 西门子 S7300 以太网模块连接组态王方法
  7. 软件工程用例图要素简单解释
  8. 华硕主板升级显示服务器连接失败,最新华硕主板电脑无法打开网页提示“域名解析错误”怎么办?...
  9. 为什么振荡电路晶体旁要放22pF电容?
  10. 幼儿园体育游戏电子计算机教案,幼儿园大班体育教案_大班体育教案_幼教网