convert PNG(alpha channel) format image to JPG, GIF, BMP

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Im Jinho

convert PNG(alpha channel) format image to JPG, GIF, BMP

Post by Im Jinho »

Environment
- Visual Studio 2008
- Magick++

Hi, everyone.

I'm using work with Magick++.

When I convert PNG(alpha) format image to JPG format, the result image have rectangle blocks of black color along borderline of a picture.
I think it's rectangle block take effect by alpha channel value of png.

How to remove rectangle block of black color?

for more infomation, I want to show you a result image, but I don't know that how to upload a file.
sorry, and thanks.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convert PNG(alpha channel) format image to JPG, GIF, BMP

Post by anthony »

JPEG does not allow alpha channel. You need to remove transparency from the image

Remove Alpha Transparency
http://www.imagemagick.org/Usage/basics/#alpha_remove
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply