Fireworks 中的 PNG8+Alpha(颜色图)与其他地方(RGBA)不同/较小。 为什么?
在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
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.
来自这两个工具的网站:
PNGOUT:
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:
Smush.it:
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.
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.