cancel
Showing results for 
Search instead for 
Did you mean: 

Converting tif image white background to transparent png file format using image magick

venkat2022
Champ in-the-making
Champ in-the-making

I am trying to convert white color backgrounded tif image type to transparent background png image type using below image magick command in alfresco 5.1.

> magick convert source_file.tif -fuzz 20% -transparent white converted_file.png

But the above command is not working for all images. For many of images, the foreground color also changing to transparent partially .and for some images, the background is still showing white after conversion also.

please help me of finding a  generic imagemagick command which will change only background color without disturbing the image colour .

Note: I tried with multiple fuzz values like 1% to 20% but not at all helping me.

2 REPLIES 2

mehe
Elite Collaborator
Elite Collaborator

I think there are too much different possibilities to pack bitmaps in tiff images. Your conversion will only work, if it is possible to identify the "background" - for example in layered tiffs.

your conversion will try to use white als transparent Color, Even if it's not the background.

venkat2022
Champ in-the-making
Champ in-the-making

Hi Martin,

    Thanks for your reply . if you see the attached source file in my previous post, i hope the image background is white only . I have same kind of tiff images which i need to convert . Can you suggest what else we can do here better

Getting started

Explore our Alfresco products with the links below. Use labels to filter content by product module.