From White to Transparent background problem

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
yurivdm
Posts: 2
Joined: 2015-01-21T03:18:13-07:00
Authentication code: 6789

From White to Transparent background problem

Post by yurivdm »

Hi all,

for first sorry for my english.

I've a problem about transforming a JPG image with a white background into a PNG with Transparent background.

Everything works fine but my problem is that for several pictures also the main image has some white color areas inside of it.

Example: an open grey fridge with a white background but with also white shelves.
So the white color is correctly removed from the background but the main image is "corrupted"

Unfortunately the color is exactly white #FFF because is a rendering.

I can't use a mask because I can't know beforehand what type of image will be processed
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: From White to Transparent background problem

Post by snibgo »

Put your image somewhere like dropbox.com and paste the URL here.

For some images, a fuzzy floodfill from a corner works well.
snibgo's IM pages: im.snibgo.com
yurivdm
Posts: 2
Joined: 2015-01-21T03:18:13-07:00
Authentication code: 6789

Re: From White to Transparent background problem

Post by yurivdm »

Thank you for your post but I've already used the fuzzy parameter in order to have a better image but this not seems to be the solution for my problem.

I need to know if it's possibile to remove white pixel only outside the image silhouette.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: From White to Transparent background problem

Post by fmw42 »

I have moved this to the User's forum, since it seems to be directly related to Imagemagick
Post Reply