Page 1 of 1

?flattenImages & opacity

Posted: 2007-09-28T11:33:19-07:00
by igorvlassov
When I use STL ImageMagic++ func flattenImages under a list of PSD layers the result image lost opacity. Do you know the way to keep opacity or inherit it from the first layer?

Thanks

Re: ?flattenImages & opacity

Posted: 2007-09-28T11:51:01-07:00
by magick
The flatten-image algorithm starts with an image canvas set to the image background color. Try setting the image background color to "none" which means completely transparent.

Re: ?flattenImages & opacity

Posted: 2007-09-28T21:17:25-07:00
by igorvlassov
I tried to use
image.backgroundColor(Color(0,0,0,QuantumRange));
flattenImages(&image, lstImages.begin(), lstImages.end());

but opacity didn't appear.

Re: ?flattenImages & opacity

Posted: 2007-10-03T06:41:12-07:00
by seanburke1979
"Color(0,0,0,QuantumRange)" is black, isn't it? Try image.backgroundColor(Color(0,0,0,1.0)). I haven't tried that, but the doumentation says that alpha is scaled 0->1.0 (opaque to transparent).

Sean