Polaroid - Impossible to save with white background as jpg

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
sabater_wb

Polaroid - Impossible to save with white background as jpg

Post by sabater_wb »

Hi guys.
I'm trying to run this code:
"convert -caption "Faerie Dragon" dragon.jpg -gravity center -background black +polaroid anno_polaroid.png"

The problem, is that when I save it as jpg, its background is saved in black.
I tried even save it as png, and after convert it to jpg, but the result is the same.

How can I save it as jpg and with a white background?

thank you.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Polaroid - Impossible to save with white background as jpg

Post by anthony »

Polaroid generates a transparent background, JPEG can not save transparency, so it comes out black.

For JPEG -flatten the image first!!!!!

See IM Examples, Common File Formats, JPEG
JPEG transparency - NOT
http://www.imagemagick.org/Usage/formats/#jpg_trans
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply