Fireworks 中的 PNG8+Alpha(颜色图)与其他地方(RGBA)不同/较小。 为什么?

发布于 2024-07-26 21:57:19 字数 603 浏览 6 评论 0原文

在 Fireworks 中,当您导出具有 alpha 透明度的 PNG8 文件时,生成的文件将如下所示:

png8-fireworks.png: PNG image data, 500 x 500, 8-bit colormap, non-interlaced

如果您使用其他工具(PNGOUT、Smush.it)转换 32 位 PNG,结果如下所示:

png24-smushit.png:  PNG image data, 500 x 500, 8-bit/color RGBA, non-interlaced
png8-pngout.png:    PNG image data, 500 x 500, 8-bit/color RGBA, non-interlaced

到底有什么区别? 它们都有 alpha 透明度,但 Fireworks 文件为 8KB,而其他文件为 20KB。 现在,Fireworks 文件的质量明显较低(即渐变上有条带)。

对于某些图像,Fireworks 中的 PNG8+alpha 效果很好,并且文件大小相对较小。 我只是无法弄清楚 Fireworks 正在做什么以及它与其他方法有何不同。

In Fireworks, when you export a PNG8 file with alpha transparency, the resulting file will be something like this:

png8-fireworks.png: PNG image data, 500 x 500, 8-bit colormap, non-interlaced

If you convert a 32bit PNG using other tools (PNGOUT, Smush.it) the result looks like this:

png24-smushit.png:  PNG image data, 500 x 500, 8-bit/color RGBA, non-interlaced
png8-pngout.png:    PNG image data, 500 x 500, 8-bit/color RGBA, non-interlaced

What exactly is the difference? They both have alpha transparency, but the Fireworks file is 8KB while the others are 20KB. Now the Fireworks file in noticeably lower quality (namely with banding on gradients).

For some images the PNG8+alpha from Fireworks works great and has a super small file size comparatively. I just haven't been able to figure out what Fireworks is doing and how it is different than the other methods.

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

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

发布评论

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

评论(3

带上头具痛哭 2024-08-02 21:57:19

PNG8 文件是一种非常有效的格式。 它会找到图像中的独特颜色,并将这些颜色保存在一个小调色板中。 最酷的部分是它还保存了调色板中每种颜色的 alpha 透明度。 (如果图像中有三个纯红色 (#FF0000),但每个都有不同的 alpha 值,比如说 255、128、65,它将在调色板中保存三个条目。

您还可以在 Fireworks 中选择限制调色板大小为 2 的幂,因此您可以减少使用的颜色以节省更多费用,通常 256 色图像在 64 色下看起来很好,并且可以节省大量重量。

The PNG8 file is a very efficient format. It finds the unique colors in the image and only saves those in a small palette. The cool part is that it also saves alpha transparency in the palette with each color. (If you have three pure reds (#FF0000) in your image, but each has a different alpha value, let's say 255, 128, 65, it will save three entries in the palette.

You can also in Fireworks choose to limit the palette size to a power of 2, so you can reduce colors used for more savings. Often a 256 color image will look fine at 64 colors and save a lot of weight.

岁月蹉跎了容颜 2024-08-02 21:57:19

来自这两个工具的网站:

PNGOUT:

它不会将图像转换为无法无损存储图像的颜色类型或位深度。

它不会减少图像中使用的颜色数量,也不会将颜色转换为灰度,除非所有颜色都已对应于 PNG 灰度值。

Smush.it:

这是一个“无损”工具[...]

都不给你一个256调色板的png:它是“colormap”(=调色板)和“rgba”(真彩色= R of 2^8 x G)之间的差异2^8 x B 的 2^8 x Alpha 的 2^8,其中 2^8 = 256)。

烟花可以。

from sites of both tools:

PNGOUT:

It won't convert an image to a color type or bit depth that cannot losslessly store the image.

It won't reduce the number of colors being used in an image, or convert the colors to grayscale unless all the colors correspond to PNG grayscale values already.

Smush.it:

It is a "lossless" tool […]

Neither gives you a 256 paletted png: it's the diff between "colormap" (= palette) and "rgba" (truecolor = R of 2^8 x G of 2^8 x B of 2^8 x Alpha of 2^8, with 2^8 = 256).

Fireworks does.

旧伤还要旧人安 2024-08-02 21:57:19

PNG-8 表示每像素 8 位,这意味着它只能显示 256 种不同的颜色(来自调色板)。

每像素 24 和 32 位允许您使用更多的颜色(从而获得漂亮平滑的渐变),但代价是文件大小。

PNG-8 means 8 bits per pixel, which means it can only display 256 different colours (from a pallet).

24 and 32 bits per pixel allow you to use far more colours (and hence get nice smooth gradients) but come at the cost of filesize.

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