remove trasparency from PNG( remove alpha)
Posted: 2018-06-28T15:11:36-07:00
Hi,
When I try to convert png to non-Png(eg JPG), the image gets corrupted if its trasparent. So I need to handle this case in my magick++ c++ code.
I am basically trying to remove transparency.
The following command line works:
1.convert transparent.png -alpha remove transparent.jpg
2.convert transparent.png -border 0 -alpha off transparent.jpg.
How can achive the same thing in c++?
I tried
1. image.alpha(off) -NOT working
2. Image.matte(false) && image.border(0) - NOT working.
I am using ImageMagick 6.9.6
Help is very much appreciated.
Thanks
When I try to convert png to non-Png(eg JPG), the image gets corrupted if its trasparent. So I need to handle this case in my magick++ c++ code.
I am basically trying to remove transparency.
The following command line works:
1.convert transparent.png -alpha remove transparent.jpg
2.convert transparent.png -border 0 -alpha off transparent.jpg.
How can achive the same thing in c++?
I tried
1. image.alpha(off) -NOT working
2. Image.matte(false) && image.border(0) - NOT working.
I am using ImageMagick 6.9.6
Help is very much appreciated.
Thanks