如果我重新保存一个丢失压缩的文件(例如 JPEG),质量是否会下降?

发布于 2024-07-26 08:24:23 字数 185 浏览 11 评论 0原文

我经常想知道,如果我加载压缩图像文件,对其进行编辑并再次保存,它是否会降低质量? 如果我在保存时使用相同的质量等级,算法是否会以某种方式检测到该文件已被压缩为 JPEG,因此没有必要再次尝试压缩显示的表示形式?

始终保留原始文件(例如 PSD)并始终对其进行更改,然后将其另存为 JPEG 或我需要的任何文件,这是一个更好的主意吗?

I've often wondered, if I load a compressed image file, edit it and the save it again, will it loose some quality? What if I use the same quality grade when saving, will the algorithms somehow detect that the file has already be compressed as a JPEG and therefore there is no point trying to compress the displayed representation again?

Would it be a better idea to always keep the original (say, a PSD) and always make changes to it and then save it as a JPEG or whatever I need?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

望喜 2024-08-02 08:24:23

当涉及有损压缩图像格式时,例如JPEG,连续压缩将导致明显的质量损失。 质量损失可能表现为压缩伪影和图像模糊等形式。

即使使用相同的质量设置来保存图像,仍然会出现质量损失。 “保持质量”或更好地尽可能减少质量损失的唯一方法是使用可用的最高质量设置。 即使如此,也不能保证不会出现质量损失。

是的,如果要使用有损压缩方案(例如 JPEG)制作图像,最好保留原始副本。 原始文件可以使用无损压缩方案保存,例如PNG,这将保持文件的质量,但代价是(通常)较大的文件大小。

(注意:有一个无损版本的 JPEG,但是,最常见的版本使用诸如 DCT 处理图像并且是有损的。)

When it comes to lossy compression image formats such as JPEG, successive compression will lead to perceptible quality loss. The quality loss can be in the forms such as compression artifacts and blurriness of the image.

Even if one uses the same quality settings to save an image, there will still be quality loss. The only way to "preserve quality" or better yet, lose as little quality as possible, is to use the highest quality settings that is available. Even then, there is no guarantee that there won't be quality loss.

Yes, it would be a good idea to keep a copy of the original if one is going to make an image using a lossy compression scheme such as JPEG. The original could be saved with a compression scheme which is lossless such as PNG, which will preserve the quality of the file at the cost of (generally) larger file size.

(Note: There is a lossless version of JPEG, however, the most common one uses techniques such as DCT to process the image and is lossy.)

故笙诉离歌 2024-08-02 08:24:23

是的,您将丢失更多文件信息。 如果进行多项更改,请处理原始未压缩文件。

Yes, you will lose further file information. If making multiple changes, work off of the original uncompressed file.

冬天的雪花 2024-08-02 08:24:23

一般来说,是的。 但是,根据压缩格式,通常可以执行某些操作(主要是旋转和镜像),而不会造成任何质量损失 软件旨在处理文件格式的属性。

理论上,由于 JPEG 独立压缩每个 8x8 块 pf 像素,因此如果使用相同的压缩设置保存图像,应该可以保留图像的所有未更改块,但我不知道有任何软件可以实现此功能。

In general, yes. However, depending on the compression format there are usually certain operations (mainly rotation and mirroring) that can be performed without any loss of quality by software designed to work with the properties of the file format.

Theoretically, since JPEG compresses each 8x8 block pf pixels independantly, it should be possible to keep all unchanged blocks of an image if it is saved with the same compression settings, but I'm not aware of any software that implements this.

<逆流佳人身旁 2024-08-02 08:24:23

当然。 因为最初使用的算法级别可能与后续保存中的算法级别不同。 您可以使用图像处理软件(例如 Photoshop)轻松检查这一点。 多次保存文件并每次更改压缩级别。 只是一点点。 您会看到图像质量下降。

Of course. Because level of algorithm used initially will probably be different than in your subsequent saves. You can easily check this by using an Image manipulation software (eg. Photoshop). Save your file several times and change level of of compression each time. Just a slight bit. You'll see image degradation.

百善笑为先 2024-08-02 08:24:23

如果更改是局部的(修复几个像素,而不是重新着色区域)并且您使用具有相同设置的原始编辑工具,则可以避免不影响的区域的质量下降。 尽管如此,由于压缩块受到影响并且无法恢复,预计更改区域周围会出现一些额外的质量损失。

真正的答案仍然是对源图像进行编辑,尽可能不压缩地捕获,并在定位图像使用之前应用所需的压缩程度。

If the changes are local (fixing a few pixels, rather than reshading a region) and you use the original editing tool with the same settings, you may avoid degradation in the areas that you do not affect. Still, expect some additional quality loss around the area of change as the compressed blocks are affected, and cannot be recovered.

The real answer remains to carry out editing on the source image, captured without compression where possible, and applying the desired degree of compression before targeting the image for use.

心舞飞扬 2024-08-02 08:24:23

是的,当您将图像重新保存为 JPEG 时,您总会丢失一些信息。 丢失多少取决于加载图像后对图像所做的操作。

如果您保持图像大小相同并且仅进行较小的更改,则不会丢失那么多数据。 加载图像时,将从压缩数据重新创建原始图像的近似值。 如果您使用相同的压缩重新保存图像,则丢失的大部分数据将是加载时重新创建的数据。

如果调整图像大小或编辑图像的大部分区域,则重新保存时将丢失更多数据。 图像的任何已编辑部分都会丢失与第一次压缩时相同的信息量。

如果您想获得最好的质量,您应该始终保留原件。

Yes, you will always lose a bit of information when you re-save an image as JPEG. How much you lose depend on what you have done to the image after loading it.

If you keep the image the same size and only make minor changes, you will not lose that much data. When the image is loaded, an approximation of the original image is recreated from the compressed data. If you resave the image using the same compression, most of the data that you lose will be data that was recreated when loading.

If you resize the image, or edit large areas of it, you will lose more data when resaving it. Any edited part of the image will lose about the same amount of information as when you first compressed it.

If you want to get the best possible quality, you should always keep the original.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文