Closed sanbuphy closed 1 year ago
icc 本来就是二进制数据,不是字符串文本,所以不需要 decode 或者 encode ,保存为 python bytes 对象即可。 https://en.wikipedia.org/wiki/ICC_profile
icc 本来就是二进制数据,不是字符串文本,所以不需要 decode 或者 encode ,保存为 python bytes 对象即可。 https://en.wikipedia.org/wiki/ICC_profile
谢谢您的回复,那我该如何把他作用在另外一个RGB图像上呢,主要是想对颜色配置信息做解析处理
示例代码:
data = img1.read_icc()
img2.modify_icc(data)
并没有特别的地方
示例代码:
data = img1.read_icc() img2.modify_icc(data)
并没有特别的地方
应用后,请问有什么api可以保存这个应用后的图片吗
请看教程: https://github.com/LeoHsiao1/pyexiv2/blob/master/docs/Tutorial-cn.md#class-image
好的,感谢,我看了,不过这样操作后最后图片的颜色并没有变化(确定读取到了icc的数据格式) 还是感谢大佬
with pyexiv2.Image(r'2ZTMC8Q6J5DS.tif') as image:
icc_profile = image.read_icc()
with pyexiv2.Image(r'rgb_image.png') as image2:
image2.modify_icc(icc_profile)
你好,我在尝试用pyexiv2对一个tif图片进行解码,我想把它的icc profile读取后应用在其他的rgb图像上。但是现在我遇到了一个问题,就是我发现读取后会显示一大段的字节串:
如果尝试decode变成utf-8的话,会直接报错,请问我该如何解决这个问题?感谢。