2019年遥感图像稀疏表征_图片为:2019年网络最佳图像格式

2019年遥感图像稀疏表征

JPEG,WEBP,HEIC,AVIF? 本指南将帮助您选择。 (JPEG, WEBP, HEIC, AVIF? This guide will help you choose.)

After decades of the unrivaled dominance of JPEG, recent years have witnessed the appearance of new formats — WebP and HEIC — that challenge this position. They have only partial, but significant, support by major players among web browsers and mobile operating systems. Another new image format — AVIF — is expected to enter the scene in 2019 with promise of sweeping through the whole web.

在JPEG占据无可比拟的统治地位之后,近年来见证了挑战这一地位的新格式WebP和HEIC的出现。 它们仅受到Web浏览器和移动操作系统中主要参与者的部分但重要的支持。 另一种新的图像格式AVIF有望在2019年进入市场,并有望席卷整个网络。

In this article, we’ll start with a short revision of the classic formats, followed by a description of WebP and HEIC/HEIF. We’ll then move on to to explore AVIF, and end with a summary putting all the main points together.

在本文中,我们将首先对经典格式进行简短修订,然后再介绍WebP和HEIC / HEIF。 然后,我们将继续探索AVIF,最后进行总结,将所有要点集中在一起。

Comments on advantages and drawbacks build both on the review of available authoritative reports and first-hand observations during the development and deployment of tools for image optimization pipelines in ecommerce workflows.

在开发和部署电子商务工作流中的图像优化管道工具期间,对优点和缺点的评论都基于对可用权威报告的审查和第一手观察。

具有通用支持的经典Web图像格式 (Classic image formats for the web with universal support)

Let’s remind ourselves, in chronological order, of the three most important classic formats for web images.

让我们按时间顺序提醒自己三种最重要的Web图像经典格式。

GIF (GIF)

GIF supports LZW lossless compression and multiple frames that allow us to produce simple animations.

GIF支持LZW无损压缩和多个帧,使我们能够生成简单的动画。

The major limitation of this format is that it is constrained to 256 colours. This was reasonable back when it was created in the late 80’s, since the same limitation applied to existing displays. However, with the improvement of display technology it became apparent that it was not suitable to reproduce any smooth color gradients, like those found in photographic images. We can easily spot the color banding that it produces.

这种格式的主要局限在于它只能限制为256色。 早在80年代末创建时,这是合理的,因为相同的限制适用于现有的显示器。 但是,随着显示技术的改进,很明显,它不适合像摄影图像中那样再现任何平滑的颜色渐变。 我们可以轻松发现它产生的色带。

However, GIF allows lightweight animation with universal support. This feature has kept the format alive until today in use cases not sensitive to quality issues, the most typical being small animated images with few or no colors.

但是,GIF允许轻量级动画具有通用支持。 直到今天,在对质量问题不敏感的用例中,此功能一直保持该格式有效,最典型的是几乎没有颜色或没有颜色的小型动画图像。

JPEG格式 (JPEG)

The king of the image formats for web was developed to support digital photography workflows.

网络图像格式之王的开发是为了支持数字摄影工作流程。

With a usual 24 bit depth, it provides far more color resolution (not to be confused with range or gamut) than the human eye can discern. It supports lossy compression by exploiting known mechanisms of human vision.

在通常的24位深度下,它提供的色彩分辨率远远超过人眼所能识别的色彩分辨率(不要与范围或色域相混淆)。 它通过利用人类视觉的已知机制来支持有损压缩。

Our eyes are more sensitive to medium scales than to fine details. Consequently, JPEG allows us to discard fine details (high spatial frequencies), by an amount controlled by a quality factor. Less quality means less detail is preserved. Besides, we are much more sensitive to details with high luminance contrast than details with only chromatic contrast.

我们的眼睛对中等尺度比对精细细节更敏感。 因此,JPEG使我们可以丢弃由质量因子控制的数量的精细细节(高空间频率)。 质量越差意味着保留的细节越少。 此外,与仅具有色差的细节相比,我们对具有高亮度对比度的细节更加敏感。

So, JPEG internally recodifies RGB (Red, Green, and Blue) images in one luminance and two chroma channels. This allows us to use chroma subsampling to discard more detail only in the chroma channels. It’s worth noting that JPEG codifies images in blocks of 8x8 pixels.

因此,JPEG在内部以一种亮度和两个色度通道对RGB(红色,绿色和蓝色)图像进行重新编码。 这使我们可以使用色度二次采样仅在色度通道中丢弃更多细节。 值得注意的是,JPEG将图像编码为8x8像素的块。

As we reduce the quality factor and/or apply more aggressive chroma subsampling, we start to get increasing artifacts of ringing, halos, blocking, or blur. An issue with JPEG is that depending on the image content, artifacts may appear at different quality factor values. The wildest difference appears when comparing the effects on natural photography with the effects on artwork. Since artwork (shapes, fonts) usually rely on sharp edges, they start to produce artifacts even for small amounts of detail discarded.

随着我们降低品质因数和/或应用更具侵略性的色度二次采样,我们开始出现越来越多的振铃,光晕,阻塞或模糊现象。 JPEG的一个问题是,根据图像内容,伪像可能会出现在不同的品质因数值上。 比较自然摄影效果和艺术品效果时,会出现最大的差异。 由于艺术品(形状,字体)通常依赖于锋利的边缘,因此即使丢弃少量细节,它们也开始产生伪影。

For photos, JPEG easily delivers a reduction of file weight by a factor of 10 with barely noticeable artifacts, compared to lossless compression.

对于照片,与无损压缩相比,JPEG可以轻松将文件重量减少10倍,并且几乎没有明显的伪像。

PNG (PNG)

This lossless graphics format was developed to replace GIF, addressing its color banding (and licensing) issues. It was needed for images with a considerable amount of artwork, for which JPEG produced large artifacts even with minimal compression rates.

开发这种无损图形格式来替代GIF,解决了其色带(和许可)问题。 对于具有大量艺术品的图像来说,这是需要的,即使压缩率极低,JPEG也会产生大量伪像。

It supports transparency and an improved compression compared to GIF. Since it does not discard information, PNG does not produce artifacts. Of course, this is at the expense of heavier image weight in the presence of many different color gradients, compared to lossy compression.

与GIF相比,它支持透明性并改善了压缩率。 由于PNG不会丢弃信息,因此不会产生伪像。 当然,与有损压缩相比,这是以存在许多不同颜色渐变的情况下较重图像重量为代价的。

It succeeds in exploiting a frequent characteristic of artwork: Unlike photography — that features a continuum of colours with subtle variations — artwork pictures usually feature few well-defined colours.

它成功地利用了艺术品的常见特征:与摄影不同,摄影的特点是连续的颜色具有微妙的变化,艺术品图片通常很少具有明确定义的颜色。

So, PNG compresses images by mapping large amounts of pixels to a simple discrete palette and saving a lot of bits as a result. Compared to GIF, it delivers much higher quality with usually far fewer bytes.

因此,PNG通过将大量像素映射到一个简单的离散调色板并节省大量位来压缩图像。 与GIF相比,它以更少的字节数提供了更高的质量。

受到部分支持的新手:基于HEVC的WEBP和HEIC (Newcomers with partial support: WEBP and HEIC based on HEVC)

Mechanisms used by video codecs to compress streams may be classified into two main types: inter-frame and intra-frame. While the first one exploits the redundancies along time, intra-frame mechanisms focus on reducing redundancy inside a given frame, without any dependency on the rest. This compression mechanism may be applied to still images.

视频编解码器用于压缩流的机制可以分为两种主要类型:帧间和帧内。 第一个利用时间上的冗余,而帧内机制则专注于减少给定帧内的冗余,而不依赖于其余帧。 该压缩机制可以应用于静止图像。

The explosion of video sharing — with mobile networks at its heart — and the steady increase of display resolution has driven the efforts on new coding standards to achieve the highest possible efficiency in compression.

视频共享的爆炸式增长(以移动网络为核心)以及显示分辨率的不断提高,推动了新编码标准的努力,以实现尽可能高的压缩效率。

So, new image formats are emerging as derivatives of the new video coding standards. These new image formats offer larger feature sets than JPEG and promise relevant savings in file weight with improved visual quality.

因此,新的图像格式正在作为新的视频编码标准的衍生形式出现。 这些新的图像格式提供了比JPEG更大的功能集,并有望在减轻文件重量的同时提高视觉质量。

WEBP (WEBP)

Google developed this format with the aim to provide a single web-capable image format to deal with all the typical use cases.

Google开发了这种格式,旨在提供一种具有网络功能的图像格式来处理所有典型的用例。

Importantly, it seeks to achieve lighter images than JPEG, without penalties on visual quality. It uses more complex operations — like block prediction — and is a derivative of the VP8 video codec. It supports lossless compression and unlike JPEG, it allows transparency and animations that may combine images coded with both lossless and lossy compression.

重要的是,它寻求获得比JPEG更亮的图像,而不会影响视觉质量。 它使用更复杂的操作(如块预测),并且是VP8视频编解码器的派生产品。 它支持无损压缩,并且与JPEG不同,它可以实现透明性和动画效果,可以结合使用无损和有损压缩编码的图像。

In principle, it should serve as a replacement for JPEG, PNG, and GIF. An important drawback has been the lack of universal support. Until recently, WebP had been restricted to Google-backed software like the Chrome browser and Android-native applications.

原则上,它应该替代JPEG,PNG和GIF。 一个重要的缺点是缺乏普遍支持。 直到最近,WebP仍仅限于Google支持的软件,例如Chrome浏览器和Android原生应用程序。

However, with the announcement that Edge and Firefox (excluding iOS Firefox) are to introduce WebP support in 2019, it’s evidently gaining traction. It’s also worth noting that Apple — Safari and iOS — does not support WebP yet.

但是,随着Edge和Firefox(不包括iOS Firefox)将在2019年引入WebP支持的宣布 ,它显然越来越受到关注。 还值得注意的是,Apple(Safari和iOS)尚不支持WebP。

HEIC / HEIF (HEIC/HEIF)

This format brings a significant evolution in two different regards.

这种格式在两个方面带来了重大的发展。

Firstly, the file container supports the largest feature set among image formats available. It supports, for instance, multi-frame images with multi-frame compression — a key feature for efficient HDR, multi-focus, or multi-view images.

首先, 文件容器支持可用图像格式中最大的功能集 。 例如,它支持具有多帧压缩的多帧图像,这是高效HDR,多焦点或多视图图像的关键功能。

Secondly, it supports many types of non-image data with a remarkable flexibility. Currently, most images using this container are compressed with a derivative for images from the H265/HEVC video codec, developed to efficiently cope with the 4k and 8k resolutions featured by the latest generation displays. HEVC coding involves more complex operations with fewer restrictions than JPEG. It achieves a much higher compression efficiency at the cost of slightly higher coding times — not a problem at all in web workflows.

其次,它以非凡的灵活性支持多种类型的非图像数据。 当前,使用此容器的大多数图像都使用来自H265 / HEVC视频编解码器的图像衍生物进行压缩,这些图像经过开发可有效应对最新一代显示器的4k和8k分辨率。 与JPEG相比,HEVC编码涉及更复杂的操作且具有更少的限制。 它以略高的编码时间为代价实现了更高的压缩效率-这在Web工作流中根本不是问题。

Like H265, HEIC based on HEVC is backed by Apple. It has native support in iOS and macOS, but — mostly due to patent and licensing issues — it is not supported by the rest of platforms (Android, Windows). Even in macOS, Safari doesn't support it. iOS apps appear to be the only viable usecase for HEIC in the web.

像H265一样,基于HEVC的HEIC也得到了Apple的支持。 它在iOS和macOS中具有本机支持,但是-主要是由于专利和许可问题-其他平台(Android,Windows)不支持它。 即使在macOS中,Safari也不支持它。 iOS应用似乎是网络上HEIC唯一可行的用例。

So a big question arises: should we offer WEBP/HEIC alternatives and JPEG, with PNG versions as a fallback?

因此出现了一个大问题:我们是否应该提供WEBP / HEIC替代品和JPEG,以及PNG版本作为后备呢?

Let’s look at each case...

让我们看看每种情况...

我应该提供WEBP衍生产品吗? (Should I serve WEBP derivatives?)

Google claims that this format produces much lighter images than JPEG with comparable quality. However, independent tests have pointed that this result is not consistent across different measures of quality, and weight reduction is, in most cases, balanced by increasing blurriness.

Google声称,这种格式产生的图像质量比JPEG图像要轻得多。 但是,独立测试指出, 在不同的质量衡量标准中 ,此结果不一致 ,并且在大多数情况下,减轻重量可以通过增加模糊度来平衡。

In our own tests with ecommerce images, we saw file savings for WebP, but at the price of more blur and less detail. Although, we also saw less risk of ringing and blocking artifacts, which we’d consider more visually annoying than blur.

在我们自己的电子商务图像测试中,我们看到WebP可以节省文件,但是代价是更加模糊,细节更少。 虽然,我们也看到了敲响和阻塞伪影的风险较小,我们认为在视觉上比模糊更令人讨厌。

As WebP lacks support by Apple browsers and operative systems, we do not generally recommend serving WebP derivatives competing with JPEG. Such moves would increase media management complexity with limited benefits.

由于WebP缺乏Apple浏览器和操作系统的支持,因此我们一般不建议提供与JPEG竞争的WebP衍生产品。 这样的举动会增加媒体管理的复杂性,而带来的利益却有限。

This situation would change if Apple started supporting WebP.

如果苹果开始支持WebP,这种情况将会改变。

If this were the case, then the extended feature set of WebP and the lighter images produced may be worth its use, effectively simplifying image management workflows.

在这种情况下,WebP的扩展功能集和生成的较浅图像可能值得使用,从而有效简化了图像管理工作流程。

To try WebP yourself, a classic tool like ImageMagick is a good option. It makes easy-to-compare image versions with different settings of quality and resolution for both WebP and JPEG. Results can be viewed with Chrome.

要自己尝试WebP,像ImageMagick这样的经典工具是一个不错的选择。 通过WebP和JPEG,可以轻松比较具有不同质量和分辨率设置的图像版本。 可以使用Chrome查看结果。

# Convert to WEBP quality 60
convert input.jpg -quality 60 output_60.webp
# Convert to JPEG quality 60
convert input.jpg -quality 60 output_60.jpg
# Convert to WEBP quality 60 and width 450px
convert input.jpg -resize 450 -quality 60 output_450_60.webp

Different combinations of quality and resolution will have different effects in each case, as the compression algorithms work differently. So, check your relevant file sizes on several images to get a grasp of the potential savings and the best settings for a given use case.

由于压缩算法的工作原理不同,质量和分辨率的不同组合在每种情况下都会产生不同的影响。 因此,在几张图像上检查您相关的文件大小,以了解对于给定用例的潜在节省和最佳设置。

我应该提供HEIC衍生产品吗? (Should I serve HEIC derivatives?)

The advantage of HEIC (over JPEG) is clear. Weight reduction is consistently significant — about 50% — without loss of visual quality. The feature set supported is simply amazing.

HEIC(优于JPEG)的优势显而易见。 减轻体重一直很重要-大约50%-不会损失视觉质量。 支持的功能集简直令人赞叹。

The problem again is browser and operative system support.

问题再次出在浏览器和操作系统支持上。

Given the patent issues of HEVC and the hefty royalties associated, we can expect support to remain restricted to those in the Apple world. Since JPEG is already efficient in compressing images, the 50% of something small might not be worth enough to add complexity to our image processing workflow.

鉴于HEVC的专利问题以及相关的高额专利使用费,我们可以预期支持仍然仅限于Apple领域的支持。 由于JPEG在压缩图像方面已经非常有效,因此50%的小图像可能不足以增加我们图像处理工作流程的复杂性。

Certain cases using large images, with a major interest in visual quality AND with a large percentage of Apple devices in their user base should consider serving this format.

在某些情况下,使用大图像,对视觉质量非常感兴趣且用户群中有大量Apple设备的情况下,应考虑采用这种格式。

Performing tests with HEIC is very easy with a Mac. Preview allows us to export an image to HEIC and JPEG with different quality values and different resolutions. You won’t need to run many tests to see the clear and systematic difference between them.

在Mac上使用HEIC进行测试非常容易。 预览允许我们以不同的质量值和不同的分辨率将图像导出到HEIC和JPEG。 您无需运行许多测试即可看到它们之间明显而系统的区别。

If you want to try something more flexible that may be integrated in a web image processing workflow, GPAC is worth a look.

如果您想尝试一些更灵活的方法,可以将其集成到Web图像处理工作流程中,那么GPAC值得一看。

AVIF呢? (What about AVIF?)

AVIF is the last of our contenders.

AVIF是我们最后的竞争者。

Like WebP and HEIC based on HEVC, AVIF is a derivative of the latest efforts in video standards. It also uses HEIF containers and so supports a complete feature set, encompassing all the main formats available. It brings much higher efficiency in compression inherited from the use of AV1 intra-frame coding mechanisms. These advantages make this format compelling.

像基于HEVC的WebP和HEIC一样,AVIF是视频标准最新成果的衍生产品。 它还使用HEIF容器,因此支持完整的功能集,包括所有可用的主要格式。 从使用AV1帧内编码机制继承而来的压缩中,它带来了更高的压缩效率。 这些优点使这种格式引人注目。

Another significant advantage comes from the Alliance for Open Media, the large consortium behind its development as a fully open approach, with an open license, free of royalties. Big players like Google, Netflix, Adobe, Mozilla, Microsoft, Facebook and Amazon — major actors in the web graphics and video scene — are backing this new format and making a case for a fast and wide adoption, both in software and hardware. While the stream format was frozen in March 2018 with a reference code available, the first devices with hardware support for AV1 are expected by the end of 2019.

另一个显着的优势来自开放媒体联盟,它是作为完全开放的方法,具有开放许可,没有使用费的完全开放方法而发展的大型财团。 网络图形和视频领域的主要参与者,例如Google,Netflix,Adobe,Mozilla,Microsoft,Facebook和Amazon等大型公司,正在支持这种新格式,并为在软件和硬件上Swift广泛采用提供了理由。 虽然流格式于2018年3月冻结, 并提供了参考代码 ,但预计到2019年底将首批支持AV1的硬件设备。

At the time of writing this article, the open source implementation of AV1 available may be still considered experimental and not suitable for production.

在撰写本文时,仍然可以将可用的AV1的开源实现视为试验性的,不适合生产。

摘要 (Summary)

JPEG will remain the king format for general images for web in 2019, and PNG will remain as a default option for images with significant artwork.

JPEG将在2019年成为网络普通图像的主要格式,而PNG将仍然是带有大量艺术品的图像的默认选项。

The reason? Universal support.

原因? 普遍支持。

Anything that opens an image will open JPEG or PNG in 2019, just like in previous years and decades! So no doubt that these universal formats will remain in place for some time yet.

任何打开图像的东西都将在2019年以JPEG或PNG格式打开,就像前几年和几十年一样! 因此,毫无疑问,这些通用格式将保留一段时间。

The benefits of WebP remain controversial. A clear advantage of WebP is its ability to also replace PNG, potentially simplifying image processing workflows. However, without universal support this advantage vanishes. This may change only if Apple changes their mind and WebP finally gets universal adoption, then it could be used as a replacement for all JPEG, PNG and GIF images. In contrast, HEIC images based on HEVC do offer clear benefits, especially for large resolutions. If traffic of iOS users is relevant for a website with large heavy images, it may be worth considering serving HEIC alternatives for them, with potential UX improvements, especially for slow mobile connections. Besides speeding up, HEIC assures quality, almost free of the annoying blocking and ringing artifacts that plague aggressive JPEG policies.

WebP的好处仍然存在争议。 WebP的明显优势是它还可以替代PNG,从而有可能简化图像处理工作流程。 但是,如果没有普遍支持,这一优势将消失。 仅当苹果改变主意并且WebP最终得到普遍采用时,这种情况才可能改变,然后它可以用作所有JPEG,PNG和GIF图像的替代品。 相比之下,基于HEVC的HEIC图像确实具有明显的优势,特别是对于高分辨率。 如果iOS用户的流量与图像较大的网站有关,则可能值得考虑为他们提供HEIC替代产品,它们可能会改善用户体验,尤其是在移动速度较慢的情况下。 除了加快速度外,HEIC还保证了质量,几乎消除了困扰积极的JPEG策略的令人讨厌的阻塞和振铃现象。

Although AVIF is expected for 2019, support and adoption will take time. But for sure, it is an image format to keep under your radar for the near future.

尽管预计AVIF将于2019年推出,但支持和采用尚需时日。 但可以肯定的是,它是一种图像格式,可在不久的将来保留在您的注意范围内。

Of course, the use of a cloud service -through an image optimization API or an image optimization plugin- will always remain an easy and straightforward alternative for getting the job done.

当然,通过图像优化API图像优化插件使用云服务将始终是完成工作的简便易行的选择。

翻译自: https://www.freecodecamp.org/news/best-image-format-for-web-in-2019-jpeg-webp-heic-avif-41ba0c1b2789/

2019年遥感图像稀疏表征

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值