[GRASS5] NVIZ TIFF output (rotated 180 degree)

Hi developers,

it seems that the TIFF output of NVIZ is sometimes rotated 180 degree
depending on the display tool.

xv: ok.
display (image magick): upside down (rotated 180 degree)
gimp: upside down (rotated 180 degree)

Is there anything we can change in NVIZ to stabilize the
image orientation of the stored TIFF file?

Thanks,

Markus

Markus,

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.

Markus Neteler wrote:

Hi developers,

it seems that the TIFF output of NVIZ is sometimes rotated 180 degree
depending on the display tool.

xv: ok.
display (image magick): upside down (rotated 180 degree)
gimp: upside down (rotated 180 degree)

Is there anything we can change in NVIZ to stabilize the
image orientation of the stored TIFF file?

Thanks,

Markus
_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

.

--
Bob Covill

Tekmap Consulting
P.O. Box 2016 Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill@tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498

On Thu, Mar 07, 2002 at 09:20:18AM -0400, Bob Covill wrote:

Markus,

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?

Hi TIFF experts... :slight_smile:

Markus

Markus Neteler wrote:

> Hi developers,
>
> it seems that the TIFF output of NVIZ is sometimes rotated 180 degree
> depending on the display tool.
>
> xv: ok.
> display (image magick): upside down (rotated 180 degree)
> gimp: upside down (rotated 180 degree)
>
> Is there anything we can change in NVIZ to stabilize the
> image orientation of the stored TIFF file?
>
> Thanks,
>
> Markus
> _______________________________________________
> grass5 mailing list
> grass5@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
>
> .
>
>

--
Bob Covill

Tekmap Consulting
P.O. Box 2016 Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill@tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498

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@virgin.net>