|
|
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
data is oriented so that the first pixel goes to the bottom left corner. I had
actually forgotten about this since I last encountered it, since all my images
are top-bottom. I don't work with a wide variety of paint programs, at least
not for creating TGA, so I don't know what is the most common pixel ordering,
but both are indeed equally valid under the TGA specification. I'll try working
a section into my code to discriminate between the different orderings so you
won't have to flip images before sending them through, this shouldn't be too
difficult.
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. The TGA specification actually supports
the image origin being in any corner, and the original motivation behind this
escapes me at the moment.
Andy
Margus Ramst wrote:
> I'd say this is because the image file is read from top to bottom. Top left
> pixel of the image is in the bottom left of the TGA and BMP files.
>
> Margus
>
> Ken wrote in message <372### [at] pacbellnet>...
> >
> > There seems to be a minor bug in the default output of your utility.
> >To get the image to "read right" that is to say to have it oriented
> >as expected using the default camera that is provided the input image
> >must be flipped or it is incorrect. The two examples below illustrate
> >what I am referring to. If I don't flip the image in a paint program
> >then the rendered image appears inverted on screen.
> >
> > Out of curiosity do you have an ini file or something set up so that
> >for your setup of pov it will use a right hand coordinate system
> >instead of Pov default left handed system. This might to some degree
> >explain the bassackwardness of the in vs out.
> >
> >--
> >Ken Tyler
> >
> >mailto://tylereng@pacbell.net
--
--------------------
"There are three men in a boat with four cigarettes but no matches.
How do they smoke??"
-The Riddler
Andrew Woodfin
UNC Charlotte Center for Precision Metrology
adw### [at] unccedu | http://www.coe.uncc.edu/~adwoodfi
--------------------
Post a reply to this message
|
|