0
votes

I am trying to convert few JPG files with white background to PNG with transparent background. I am using the following command:

convert 2868cif.jpg -fuzz 10% -transparent white 2868cif.png

The command works fine on most of the images. But for images with white content it converts them to as white. refer to sample images below:

Original image enter image description here

convert image enter image description here

In logical terms, I can understand why this is happening. I just wanted to know if there is a workaround for this using imagemagick?

1
did you resolve this problem ? Im having the same issue - JonTargaryen

1 Answers

0
votes

Try floodfill with transparent color:

convert input.jpg -fuzz 15% -fill none -draw "matte 0,0 floodfill" output.png