Michael Bierenfeld wrote:

> 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 ()

(umm.  what's wrong with using "image = Image.open(pgmpfile)" ?)

> 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.

Looks like someone didn't read the TIFF specification.  The "samples per pixels"
tag (tag 277) defaults to 1 in all versions of the specification, and is only 
required
for images that consist of multiple bands (such as RGB and RGBA).

The pytiff library should be fixed to use proper defaults for "missing" fields 
(see
appendix A in the TIFF specification for details).

</F> 



_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to