Page 1 of 1

Getting transparent color?

Posted: 2007-01-27T02:42:13-07:00
by aditan22
Hi,

I've been searching about this thing and couldn't find it. How to get the transparent color of an image? my purpose is creating another image (not duplicating) which has the same transparent color. Another purpose is to check whether an image has transparency or not.

So...is there any method to do that?

Thanks.

Posted: 2007-01-30T03:56:43-07:00
by aditan22
is there any function / method to do this? I need this one....

thanks.

Posted: 2007-02-03T01:15:16-07:00
by aditan22
Geee... since it has no answer, I think there's no function to get the transparent color of an image, it's not a good thing because we will often need it :(

Re: Getting transparent color?

Posted: 2007-02-19T20:58:13-07:00
by anthony
All I know is the transparent color is saved as image meta-data attribute, for later use if the -transparnet-color setting is not defined.

Internally how this is done' I have not looked, but following the command line API is not too difficult.

Use the source Luke!

Re: Getting transparent color?

Posted: 2007-03-05T03:32:34-07:00
by aditan22
thanks for the info, although I still didn't get it how to return the image's transparent color, I just compare with imagecolortransparent from GD.

Re: Getting transparent color?

Posted: 2007-03-05T08:52:01-07:00
by tsr
Well, you can easily get the info from the return string from MagickDescribeImage(), just look at the output and it should be fairly straightforward to get the transparent color attribute from it.

FR: MagickDescribeImageArray() ?

/tsr

Re: Getting transparent color?

Posted: 2007-03-05T23:29:40-07:00
by aditan22
thanks! I'll definitely try that...!