PNG图像问题?

发布于 2024-10-25 08:06:23 字数 1459 浏览 5 评论 0原文

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

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

发布评论

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

评论(4

柏林苍穹下 2024-11-01 08:06:23

质量

JPEG 质量永远不会比 PNG“更好”,因为 PNG 被压缩而不会丢失任何信息。如果您编辑并保存 PNG 一百次,质量将保持不变。

另一面的 JPEG 图像在压缩时会丢失信息。多次编辑和保存 JPG 文件会大大降低质量,甚至到了明显的程度。

JPEG 与 PNG

One 使用 JPEG 来存储照片,因为它可以压缩照片而不会造成明显的质量损失。 PNG 也可以用于照片,但压缩率永远不会那么好。 PNG 更适合简单的图形和线条艺术。然而 JPEG 绝对不应该用于此目的,因为可能会出现振铃伪影(参见图片)

隔行

扫描 引入隔行扫描,以便在传输 PNG 文件时,即使尚未传输整个图像,也可以看到较低分辨率的预览。

Quality

JPEG quality is never "better" than PNG, as PNGs are compressed without loss of any information. If you edit and save a PNG a hundred times, the quality will stay the same.

JPEG images on the other side lose information when you compress them. Editing and saving a JPG file more than once will reduce the quality drastically, to some point where it's noticeable.

JPEG vs PNG

One uses JPEG for photographs because it compresses them without noticeable quality loss. PNGs can be used for photographs too, but the compression rate will never be as good. PNGs work better for simple graphics and line art. JPEGs however should never be used for this purpose, as ringing artefacts can appear (see image)

Interlacing

Interlacing is introduced so that when a PNG file is transmitted, a lower-resolution preview can be seen, even if the whole image isn't transferred yet.

羁〃客ぐ 2024-11-01 08:06:23

当调制解调器速度非常慢时,Interlace曾经被用来显示图像的低分辨率版本。加载高分辨率版本时将显示低分辨率版本。

在现代没有必要使用它。

JPG 擅长压缩照片。有很多色调和颜色的东西。

PNG/GIF 非常擅长压缩线条艺术。具有相同颜色的大块的东西。

如果您在线条艺术上使用 JPG,您有时会看到色块边缘周围出现模糊变形,这就是为什么您应该避免使用 JPG 来制作艺术作品。

Interlace was once used to display a low-resolution version of the image back when modems were really slow. The low-res version would be shown while the high-res one was loading.

No need to use it in these modern times.

JPG is good at compressing photographs. Things with lots of tones and colours.

PNG/GIF is very good at compressing line-art. Things with big blocks of the same colour.

If you use JPG on line art you sometimes see fuzzy distortions around the edges of blocks of colours, which is why you should avoid JPG for artwork.

橘寄 2024-11-01 08:06:23

PNG 还允许没有背景的图像,这对于网页设计很有用

PNG also allows for images without background which is usefull for web designs

π浅易 2024-11-01 08:06:23

“隔行扫描”PNG 图像的像素以复杂的顺序存储,当仅看到部分像素时,可以粗略地显示整个图像。如果您通过非常慢的网络连接发送图像,那么您可能会想要使用此功能,尽管这取决于接收端实际能够利用的任何内容。否则,不要这样做。

PNG 是无损压缩的:显示的图像正是输入到生成 PNG 的图像中的图像。 JPEG 是有损压缩的:显示的图像将不相同。对于某些类型的图像(例如大多数照片),即使应用了大量压缩,肉眼也几乎察觉不到有损压缩的效果。对于其他一些类型(例如文本或线条艺术),效果可能非常明显且非常令人不快。当存储为 JPEG 时,清晰的颜色/亮度过渡与非常平滑的区域相邻的图像可能看起来非常糟糕。

"Interlaced" PNG images have their pixels stored in a complicated order that enables a coarse approximation to the whole image to be displayed when only some of the pixels have been seen. If you're sending images across a really slow network connection then you might conceivably want to use this feature, though it depends on whatever's on the receiving end actually being able to take advantage. Otherwise, don't do it.

PNGs are compressed losslessly: the image displayed is exactly the image that was fed into whatever generated the PNG. JPEGs are compressed lossily: the image displayed will not be identical. For some sorts of image -- for instance, most photographs -- the effect of the lossy compression is scarcely detectable by eye even when a great deal of compression has been applied. For some other sorts -- for instance, text or line art -- the effect is likely to be very obvious and very unpleasant. Images where sharp colour/brightness transitions are adjacent to very smooth regions are likely to look very bad when stored as JPEGs.

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