gpt4 book ai didi

image - gif 中颜色分辨率位的用途

转载 作者:行者123 更新时间:2023-12-04 15:03:27 25 4
gpt4 key购买 nike

我剖析了一张 gif 图像,这是标题中的数据:
['G', 'I', 'F', '8', '9', 'a', '^', '\x01', '^', '\x01', '\x87', '\x00', '\x00', '\x00', '\x00', '\x00', '\x01', '\x00', '\x00', '\x01']

0x87 表示 gif 中的标志字节。将其转换为二进制结果为 0b10000111。

我正在使用 http://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp作为引用。

因此,根据该网站的说法,gif 具有(零 + 1)颜色分辨率(2 种可能的颜色,即使图像有更多颜色)。我尝试编辑这个数字,它似乎没有改变任何东西。有人可以解释颜色分辨率位的用途吗?

最佳答案

您可以无害地编辑它,因为它不需要解码数据——它所做的只是描述数据的“来源”(该字节的最后三位是适用于该特定图像的内容)。

标准本身 http://www.w3.org/Graphics/GIF/spec-gif89a.txt (第 9 页)说:

This value represents the size of the entire palette from which the colors in the graphic were selected, not the number of colors actually used in the graphic.



然后继续添加:

This value should be set to indicate the richness of the original palette, even if not every color from the whole palette is available on the source machine.



所以看起来即使是原作者也不知道如何使用它。而且由于它不是很有用,我想它没有被某些软件正确设置。

[我能看到的唯一用途是,如果此值大于所使用的实际颜色深度,您可以添加一个标题/弹出窗口,说“原始图像比这更好”。]

关于image - gif 中颜色分辨率位的用途,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7128265/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com