POV-Ray : Newsgroups : povray.binaries.images : New TGAMosaic and a little dog Server Time
4 Oct 2024 07:13:01 EDT (-0400)
  New TGAMosaic and a little dog (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Andrew Woodfin
Subject: Re: New TGAMosaic and a little dog
Date: 28 Apr 1999 14:50:38
Message: <3727499B.FD41BA87@uncc.edu>
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

From: Ian Burgmyer
Subject: Re: New TGAMosaic and a little dog
Date: 29 Apr 1999 01:07:30
Message: <3727db02.0@news.povray.org>
Not to sound super-demanding, but I must say that a LOT of people use Paint
Shop Pro, so you might want to consider changing it to that format.

This program looks cool, btw :)

-Ian

Andrew Woodfin <adw### [at] unccedu> wrote in message
news:3727499B.FD41BA87@uncc.edu...
>     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

From: Jon A  Cruz
Subject: Re: New TGAMosaic and a little dog
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

From: Andrew Woodfin
Subject: Re: New TGAMosaic and a little dog
Date: 29 Apr 1999 12:42:29
Message: <37287D13.2A264739@uncc.edu>
Jon A. Cruz wrote:

> ... Also, do you have a copy of the official
> Truvision specs for TGA?


I do. I don't know if you're just curious or if you would like them. If the latter, I
can email them to you, they are in pdf converted from the original postscript.

Andy

--

--------------------
"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

From: Jon A  Cruz
Subject: Re: New TGAMosaic and a little dog
Date: 30 Apr 1999 01:31:37
Message: <3729325D.485C53CF@geocities.com>
Andrew Woodfin wrote:

> Jon A. Cruz wrote:
>
> > ... Also, do you have a copy of the official
> > Truvision specs for TGA?
>
> I do. I don't know if you're just curious or if you would like them. If the latter,
I
> can email them to you, they are in pdf converted from the original postscript.
>

That's OK. I have some actual hard-copies laying around here somewhere (Truevision was
very nice about sending those out free of charge.)

I just wanted to make sure that you had them. Some of the people I've talked to on the
net were only using the simple descriptions out there, and not the real thing.

(BTW, for the lurkers and such out there who might need to know:
ftp://ftp.truevision.com/pub/TGA.File.Format.Spec )


Post a reply to this message

From: GrimDude
Subject: Re: New TGAMosaic and a little dog
Date: 30 Apr 1999 03:37:28
Message: <37294fa8.0@news.povray.org>
I know not everyone subscribes to the MS monopoly, but...

I recently bought MSWord on CD. It came with Photo Editor, and this outputs
tga's just right for this utility (TGAMosaic).

GrimDude
vos### [at] arkansasnet


Post a reply to this message

From: Andrew Woodfin
Subject: Re: New TGAMosaic and a little dog
Date: 30 Apr 1999 16:38:57
Message: <372A0602.439431BD@uncc.edu>
Jon A. Cruz wrote:

> (BTW, for the lurkers and such out there who might need to know:
> ftp://ftp.truevision.com/pub/TGA.File.Format.Spec )


Martin Reddy's 2-D graphics file format page also has nice postscript versions of the
TGA
specification (since I'm not a rich text fan) at
 http://www.dcs.ed.ac.uk/~mxr/gfx/2d/Targa_tc.ps  (table of contents)
 http://www.dcs.ed.ac.uk/~mxr/gfx/2d/Targa.ps  (full TGA spec)

Andy
--

--------------------
"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

From: Andrew Woodfin
Subject: Re: New TGAMosaic and a little dog
Date: 30 Apr 1999 16:41:20
Message: <372A068F.9964E72E@uncc.edu>
Ian Burgmyer wrote:

> Not to sound super-demanding, but I must say that a LOT of people use Paint
> Shop Pro, so you might want to consider changing it to that format.
>
> This program looks cool, btw :)
>
> -Ian
>

I fixed the problem in the code, so the utility now can read top-bottom or
bottom-top ordered TGA's and give the correct output. The revised version can be
retrieved from my webpage at
http://www.coe.uncc.edu/~adwoodfi/
or in pov.binaries.utilities

Andy

--

--------------------
"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

From: Ken
Subject: Re: New TGAMosaic and a little dog
Date: 1 May 1999 01:31:50
Message: <372A8325.A9572C9E@pacbell.net>
Andrew Woodfin wrote:

> I fixed the problem in the code, so the utility now can read top-bottom or
> bottom-top ordered TGA's and give the correct output. The revised version can be
> retrieved from my webpage at
> http://www.coe.uncc.edu/~adwoodfi/
> or in pov.binaries.utilities
> 
> Andy
> 
> --

Thank you Andy.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Andrew Woodfin
Subject: Re: New TGAMosaic and a little dog
Date: 3 May 1999 16:06:24
Message: <372DF2E6.7E7BDC93@uncc.edu>
Ken wrote:

> Andrew Woodfin wrote:
>
> ......



> Thank you Andy.
>
> --
> Ken Tyler
>
> mailto://tylereng@pacbell.net

 Anything for my favorite uncle.

Andy

--

--------------------
"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

<<< Previous 10 Messages Goto Initial 10 Messages

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