colorspace patch by Lieb Simon
parent
2e8180ddee
commit
170c97a12b
|
@ -146,10 +146,10 @@ class PDFConverter(PDFLayoutAnalyzer):
|
||||||
if len(filters) == 1 and filters[0] in LITERALS_DCT_DECODE:
|
if len(filters) == 1 and filters[0] in LITERALS_DCT_DECODE:
|
||||||
ext = '.jpg'
|
ext = '.jpg'
|
||||||
data = stream.get_rawdata()
|
data = stream.get_rawdata()
|
||||||
elif stream.colorspace is LITERAL_DEVICE_RGB:
|
elif image.colorspace is LITERAL_DEVICE_RGB:
|
||||||
ext = '.bmp'
|
ext = '.bmp'
|
||||||
data = create_bmp(stream.get_data(), stream.bits*3, image.width, image.height)
|
data = create_bmp(stream.get_data(), stream.bits*3, image.width, image.height)
|
||||||
elif stream.colorspace is LITERAL_DEVICE_GRAY:
|
elif image.colorspace is LITERAL_DEVICE_GRAY:
|
||||||
ext = '.bmp'
|
ext = '.bmp'
|
||||||
data = create_bmp(stream.get_data(), stream.bits, image.width, image.height)
|
data = create_bmp(stream.get_data(), stream.bits, image.width, image.height)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue