Allways black transparency in JPEG images
Posted: 2007-09-01T20:03:19-07:00
Hello,
I have an image with transparency. And I want to save it as JPEG. I am using C. Everything works fine, except that transparent image places are black in output image. And I could not figure out how to change it, lets say to white.
Tried this:
Does not work.
Does not work also.
By the way: MagickGetImageMatte(saveWand) returns MagickTrue;
Any help would be very appreciate.
p.s.using ImageMagick 6.3.4
I have an image with transparency. And I want to save it as JPEG. I am using C. Everything works fine, except that transparent image places are black in output image. And I could not figure out how to change it, lets say to white.
Tried this:
Code: Select all
PixelWand *myPixelWand = NewPixelWand();
PixelSetColor(myPixelWand,"rgba(255,255,255,255)");
PixelSetOpacity(myPixelWand, 1.0); // tried 0.0 and 1.0
MagickSetImageMatteColor(saveWand, myPixelWand);
DestroyPixelWand(myPixelWand);
Code: Select all
PixelWand *myPixelWand = NewPixelWand();
PixelSetColor(myPixelWand,"rgba(255,255,255,255)");
PixelSetOpacity(myPixelWand, 1.0); // tried 0.0 and 1.0
MagickSetImageBackgroundColor(saveWand, myPixelWand);
DestroyPixelWand(myPixelWand);
By the way: MagickGetImageMatte(saveWand) returns MagickTrue;
Any help would be very appreciate.
p.s.using ImageMagick 6.3.4