PNG with opacity on JPEG ?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Tiffany

PNG with opacity on JPEG ?

Post by Tiffany »

Hi,

Is there any way to paste(fusion?) a PNG ( with opacity and alpha blending ) on a JPEG ?
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: PNG with opacity on JPEG ?

Post by rmagick »

That's called compositing. Here's the scoop: http://www.imagemagick.org/Usage/compose/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: PNG with opacity on JPEG ?

Post by anthony »

JPEG can not handle transparency, so you need to remove the transparency by overlaying the image onto some background.

the simplist method is to set -background, and the -flatten. But other composition methods can also be used.

See JPEG transparency - NOT!
http://www.imagemagick.org/Usage/formats/#jpg_trans
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply