python颜色代码出错_Python PIL错误地解码TIFF颜色(使用不正确的颜色空间)?

当我使用PIL == 1.1.7加载TIFF图像时,似乎得到颜色空间错误:

这是怎么回事?

> .tiff是使用convert test.jpg test.tiff创建的(但是似乎也发生在其他tiff文件)

>可以在:http://hul.wolever.net/dump/test.tiff找到

> PIL.Image.DEBUG = True时的输出:

>>> from PIL import Image

>>> Image.DEBUG = True

>>> Image.open("/tmp/test.tiff").show()

tag: ImageWidth (256) - type: short (3) - value: (560,)

tag: ImageLength (257) - type: short (3) - value: (401,)

tag: BitsPerSample (258) - type: short (3) - value: (8, 8, 8)

tag: Compression (259) - type: short (3) - value: (7,)

tag: PhotometricInterpretation (262) - type: short (3) - value: (2,)

tag: FillOrder (266) - type: short (3) - value: (1,)

tag: DocumentName (269) - type: ascii (2) - value: /tmp/lemur.tiff

tag: StripOffsets (273) - type: long (4) - value: (8, 9282, 18712, 28312, 38000, 48730, 59052, 70406, 83010, 95978, 108967, 121029, 133136, 145555, 157411, 168289, 179433, 191157, 202954, 214664, 226914, 238919, 250547, 261871, 273282, 284453)

tag: Orientation (274) - type: short (3) - value: (1,)

tag: SamplesPerPixel (277) - type: short (3) - value: (3,)

tag: RowsPerStrip (278) - type: short (3) - value: (16,)

tag: StripByteCounts (279) - type: long (4) - value: (9274, 9430, 9600, 9688, 10730, 10322, 11354, 12604, 12968, 12989, 12062, 12107, 12419, 11856, 10878, 11144, 11724, 11797, 11710, 12250, 12005, 11628, 11324, 11411, 11171, 2541)

tag: XResolution (282) - type: rational (5) - value: ((1207959552, 16777216),)

tag: YResolution (283) - type: rational (5) - value: ((1207959552, 16777216),)

tag: PlanarConfiguration (284) - type: short (3) - value: (1,)

tag: ResolutionUnit (296) - type: short (3) - value: (1,)

tag: PageNumber (297) - type: short (3) - value: (0, 1)

tag: JPEGTables (347) - type: undefined (7) - value: ????C??

???}!1AQa"q2??#B??R??$3br?

%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz???????????????????????????????????????????????????????????????????????????

tag: YCbCrSubSampling (530) - type: short (3) - value: (2, 2)

*** Summary ***

- compression: jpeg

- photometric_interpretation: 2

- planar_configuration: 1

- fill_order: 1

- size: (560, 401)

format key: ('II', 2, 1, 1, (8, 8, 8), ())

- raw mode: RGB

- pil mode: RGB

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值