views:

19

answers:

0

for the reportlab library there is a module utils.py, and within this module a class

class ImageReader(object):

I was expecting to use this class to get RGB style data of integers between 0 and 255 but instead my code returns the following (1718461541,)

for each print line below

import struct
filename = "pakistan.jpg"
imageObj = utils.ImageReader(filename)
print struct.unpack('<i',imageObj.getRGBData()[0:4])
print struct.unpack('<I',imageObj.getRGBData()[0:4]) 
print struct.unpack('<l',imageObj.getRGBData()[0:4]) 
print struct.unpack('<L',imageObj.getRGBData()[0:4])

also, if this gives any clues:

>>> imageObj.getRGBData()[0:4]
'e\xa4mf'