colorspace patch by Lieb Simon

pull/1/head
Yusuke Shinyama 2011-06-06 17:10:12 +09:00
parent 2e8180ddee
commit 170c97a12b
1 changed files with 2 additions and 2 deletions

View File

@ -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: