POV-Ray : Newsgroups : povray.binaries.images : New TGAMosaic and a little dog : Re: New TGAMosaic and a little dog Server Time
4 Oct 2024 09:16:47 EDT (-0400)
  Re: New TGAMosaic and a little dog  
From: Jon A  Cruz
Date: 29 Apr 1999 03:56:09
Message: <372802BA.D0A02CC1@geocities.com>
Andrew Woodfin wrote:

>     The short answer to Ken's question re: the coordinate system assumed by my
> utility is no, it assumes left-handed standard POV.
>     The long answer, also as a clarification of Magnus' remark, is this depends
> on the software you use to create your TGA. I usually run mine through Lview
> Pro to create the TGA, and this yields top-to-bottom ordering, with the first
> pixel going to the top left corner. I've noticed the same "upside-downing" with
> files created by some paint programs (e.g., PaintShop Pro), where the image

The standard behavior for TGA files is bottom-top (matches the standard cartesian
coordinates you learned in school). So, I'd say it was important to support those
TGA's.


>     Just as a technical note: if you look at your 24-bit uncompressed (type 2)
> TGA in a hex editor, the 18th byte will show the pixel ordering. Decimal 32
> (hex 20) denotes first pixel goes to top-left corner, while decimal 0 denotes
> first pixel goes to bottom-left corner.

Well, it should apply for all types (not just type 2). Also, you might mention
that byte is a bit-field. (does it have other toggles also?).


>                                          The TGA specification actually supports
>
> the image origin being in any corner, and the original motivation behind this
> escapes me at the moment.

I believe that it had a lot to do with the physical memory layout of video cards
of the time, how it was addressed, etc. The format was created to support their
video cards, so that's where a lot of it comes from (especially that
'pseudo-color' or whatever mode). Also, do you have a copy of the official
Truvision specs for TGA?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.