List Info

Thread: Patch for saving .tga files




Patch for saving .tga files
user name
2007-02-03 08:20:50
Reposting with plain text:

---------- Forwarded message ----------
From: Alexey Borzenkov <snaurygmail.com>
Date: Feb 3, 2007 4:55 PM
Subject: Patch for saving .tga files
To: image-sigpython.org


Hi everyone,

Another patch from me, this time to save .tga files. You can
grab it here:

http://snaury.googlepages.com/Imaging-1.1.6-df-tga.patch


However I must note that for saving RGBA images you will
need my
another patch I posted earlier today:

http://snaury.googlepages.com/Imaging-1.1.6-df-bgr.patch


The .tga saving I did is the very minimal that *seems* to
work for me
(I based it on code that saves .bmp files), however I'm
really not
sure about whether I'm saving palette information correctly
or not.
The main concern is that I don't know how to determine
whether image's
palette is RGB or RGBA, and thus it's possible to lose
alpha
information when loading .tga file with BGRA palette and
then saving
it back (because palette will be saved as BGR). But I hope
it'd help
others nonetheless.
_______________________________________________
Image-SIG maillist  -  Image-SIGpython.org
htt
p://mail.python.org/mailman/listinfo/image-sig

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )