Reposting with plain text:
---------- Forwarded message ----------
From: Alexey Borzenkov <snaury gmail.com>
Date: Feb 3, 2007 4:55 PM
Subject: Patch for saving .tga files
To: image-sig python.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-SIG python.org
htt
p://mail.python.org/mailman/listinfo/image-sig
|