On Sun, 20 Jan 2002 08:09:55 +0000
Nick Lamb <[EMAIL PROTECTED]> wrote:
> [re-formatted for your 80x25 pleasure]
> On Sun, Jan 20, 2002 at 12:22:44AM -0600, Russell Valentine wrote:
> > Gimp Developers:
> > This patch was made against The Gimp stable 1.2.2 file
> > plug-ins/common/tga.c.
> > It allows a user to save a tga in down-top format instead of
> > top-down format. This is very useful for many OpenGL programs.
> > It is very useful if you are working with the Quake 3 engine as
> > Quake 3 will display the image upside down.
> Russell, please don't take any of the ranting below as aimed at you...
> I don't think Quake 3 and "many OpenGL programs" should do this. They
> CAN fix this up on the fly when loading, and presumably they're not
> trying to squirt textures straight off disk into 3D hardware. So
> personally I'd be happy to say "Blame JC and his ilk for their laziness,
> not us"...
> In this case there is something Gimp can do which helps and is still
> legal(and so doesn't extend the Wrong Thing any further) so I suppose we
> should actually add this feature since it seems to be popular with
That sounds good. It really isn't the "Wrong Thing" if it is legal right?
Or are you saying it is the "Wrong Thing" that, if a program reads a
image file it should understand the entire specification?
> > If this is the wrong place to post this let me know. If someone
> > doesn't think Gimp default should be able to save tga's please
> > explain.
> Gimp does save TGAs, the flags in them are correct (AFAIK) and it does
> so quickly because it chooses an order that was convenient to program in
> Gimp. TGA gives the choice of scanline order to the creatinng software,
> and it was convenient for us to choose top-to-bottom order.
Yeah, I'm sorry I should have read my own message over many more times, I
wanted to say to save tga's in a down-top format.
> > Many imaging application save tga's in down-top by default. If you
> > need the patch a different way, let me know as this is the first time
> > I've submited a patch to a project.
> Unfortunately this patch modifies the source image (at least AFAICT) and
> is therefore unacceptable. But the idea is correct, you might want to
> contemplate actually reading the scanlines in reverse order out of Gimp
> to achieve what you want.
Alright, I will try to figure that out. My first try was just:
gimp_pixel_rgn_get_rect (&pixel_rgn, pixels, 0, height-row, width, 1);
if the down-top box was selected, I quickly noticed that it doesn't seem
to work that way. Thank you for your feedback. I'll post another patch
when it doesn't modify the source image.
Gimp-developer mailing list