Jeffrey Brent McBeth wrote:
On Tue, Sep 13, 2005 at 06:06:14AM +0300, Diaa Sami wrote:
first, I want to thank you for your long and clear response.
well, you're asking about what I'm trying to achieve.
what I want is to have somekind of transparent color which is written in
the PNG file.
I don't want to have an alpha channel, just that transparent color.
I'm don't know the details of the PNG file format, but I almost sure it
is possible, because IrfanView does it.
if you want, download that IrfanView, and choose PNG as the saving file
format, you'll find a checkbox called 'save transparent color'.
Ahhh. "tRNS" I haven't looked at that chunk in a long time. Hmm, I hate to
say it, but ImageMagick might be your best bet. I actually wasn't aware of
this particular trick of using tRNS without a PLTE chunk in the image.
Interesting.
Yeah, create the image in GIMP with whatever the color you want to have be
transparent in place, then in ImageMagick, run
convert input.png -transparent color output.png
My initial reaction was that it would be easy to patch the GIMP to mimic
ImageMagick's behaviour, but it really is a can of worms having a color
pretend to be transparent.
Jeff
that's exactly what I wanted, I looked into PNG docs, and I found out
that there are two functions responsible for this, which are
png_get_tRNS and png_set_tRNS.
ok, I'll use ImageMagick to do it.
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user