convert -transparent didn't work on my server.

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
lhjava

convert -transparent didn't work on my server.

Post by lhjava »

I try to make black color transparent within one png format image.

/usr/bin/convert -transparent black input.png output.png

this command can get what I want on windows computer but it can't on my hosting server(Linux).

any one can help me fill out this problem?
thank you very much.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convert -transparent didn't work on my server.

Post by anthony »

You need two things to make black transpartent. the operator whcih you have, and the alpha channel in the image, which you presumabky do not.

Try this, which has also been argument order corrected, to read the image BEFORE trying to modify it, (without using the legacy support).

Code: Select all

   convert input.png -matte -transparent black output.png
Enjoy.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply