2017.01.20 19:06 "[Tiff] Fwd: TIFF image displayed upside down", by Vincent Torri

2017.01.20 22:33 "Re: [Tiff] Fwd: TIFF image displayed upside down", by Mickey Rose

Od: Vincent Torri <vincent.torri@gmail.com>

"On Fri, Jan 20, 2017 at 8:51 PM, Olivier Paquet

<olivier.paquet@gmail.com> wrote:

2017-01-20 14:06 GMT-05:00 Vincent Torri <vincent.torri@gmail.com>:

so the result is like I display the lines in the reverse order (from bottom to top, and not from top to bottom)

man TIFFRGBAImageGet says:

"(Note that the raster is assume to be organized such that the pixel at location (x,y) is raster[y*width+x]; with the raster origin in the lower-left hand corner.)"

So TIFFRGBAImageGet will always reorient the image and it does it the "windows bitmap" way.

thank you, i know why :)

now, how can I use libtiff to display it correctly? i've tried several things, without success

"

After you intiialize the TIFFRGBAImage structure with TIFFRGBAImageBegin, set img->req_orientation = ORIENTATION_TOPLEFT (it defaults to BOTLEFT). TIFFRGBAImageGet will then output the top row first.