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
?flattenImages & opacity
Re: ?flattenImages & opacity
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
I tried to use
image.backgroundColor(Color(0,0,0,QuantumRange));
flattenImages(&image, lstImages.begin(), lstImages.end());
but opacity didn't appear.
image.backgroundColor(Color(0,0,0,QuantumRange));
flattenImages(&image, lstImages.begin(), lstImages.end());
but opacity didn't appear.
Re: ?flattenImages & opacity
"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
Sean