Greetings,
I have just joined the list .. so nice greetings to all :
The following code :
fp = open (pgmpfile) # 8 Bit pgm File
imagecontent = fp.read ()
fp.close ()
parser = ImageFile.Parser ()
parser.feed (imagecontent)
image = parser.close ()
image.save (tifffile)
Stores a PGM-File as a TIFF-File. The File should be further processed by
pytiff. But this packages throws the following Exception while executing
reader = pytiff.TiffReader (tifffile)
ValueError: TIFF image doesn't have a samples per pixel tag.
The same happens if I convert the Image with image = image.convert ("1")
Then it complains "ValueError: TIFF image doesn't have a bits per sample tag"
too. Does anybody know how to set these parameters in the saved TIFF-File ?
_______________________________________________
Image-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/image-sig