Problem creating backgorund transparent

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
Posts: 38
Joined: 2010-12-14T03:56:10-07:00
Authentication code: 8675308

Problem creating backgorund transparent

Post by ratneshsoni » 2012-03-24T01:45:07-07:00


I am using below command to make background transparent. in this there is white background over there and i want to make it transparent.

convert -alpha set -channel RGBA -fuzz 10% -fill none -floodfill +0+0 '#FFFFFF'

but as i run this command i got following error. What did i do wrong in this, please let me know and help me in resolving this issue.
convert.exe: unrecognized color `'#FFFFFF'' @ warning/color.c/GetColorCompliance/947.

Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Problem creating backgorund transparent

Post by Bonzo » 2012-03-24T04:24:03-07:00

This works for me with Windows command line:

Code: Select all

convert 454_env_liner.png -fuzz 10% -transparent #FFFFFF 454_env_linernew.png
This also worked:

Code: Select all

convert -alpha set -channel RGBA -fuzz 10% -fill none -floodfill +0+0 #FFFFFF

User avatar
Posts: 25765
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem creating backgorund transparent

Post by fmw42 » 2012-03-24T09:39:39-07:00

convert -alpha set -channel RGBA -fuzz 10% -fill none -floodfill +0+0 '#FFFFFF'
As you seem to be on Windows, try double quotes around your hex color and not single quotes. Also -fuzz 10% needs to be 10%%. The percent needs to be escaped in Windows.


Do you have write access to to be able to upload after creating that file?

Post Reply