1993.08.20 01:22 "help on TIFFReadRGBAImage", by Yip Chi Lap

1993.08.23 08:07 "help on TIFFReadRGBAImage", by Oliver Trepte

The Orientation tag specifies where the raster coordinate system origin is. The TIFF spec uses rows+columns and TIFFPrintDirectory mimics that terminology. You will either need to read the image rows in reverse order or change ppm2tiff to setup the origin to reflect your data. I don't know about ppm stuff; if it has origin information then it should propagate the information. Otherwise either the data must be organized correctly or you should add an option to ppm2tiff to set the origin to reflect the data.

For what it's worth, the PPM standard specifies that the first pixel in the file is in the lower left corner. This is always the case, and it can't be set to anything else from within the PPM file.

Oliver