[GRASS5] NVIZ TIFF output (rotated 180 degree)

Glynn Clements glynn.clements at virgin.net
Thu Mar 7 11:34:02 EST 2002


Markus Neteler wrote:


> > I had noticed that in the past. The place to look for this problem is in 
> > the ogsf library, in gsd_img_tif.c. This file contains the TIFF header 
> > info. Probably something in the header is wrong or the actaul image is 
> > being written wrong (rows / columns).
> > 
> > Hopefully it is something simple.
> 
> Probably 
>     TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_BOTLEFT); 
> is not correct in that file or not sufficient?

It's correct; it's not sufficient in the sense that "display" and
"gimp" (and "tifftopnm") appear to ignore the orientation tag and
assume top-to-bottom.

The workaround is to write the image in top-to-bottom order, as is
done for PPM. I'll commit this shortly.

This is a symptom of the more general problem with TIFF: it has so
many options that most programs which claim to read TIFF images only
read certain TIFF images. If you're creating TIFF images, you have to
discover by trial-and-error which options are supported by which
programs.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list