0

I am using following imagemacgick code to convert TIFF to PNG

convert -profile ISOcoated_v2_eci.icc -profile eciRGB_v2.icc 1.tiff 3.png

TIFF file is at

http://dev9.edisbest.com/images/1.tiff

Converted PNG is AT

http://dev9.edisbest.com/images/3.png

The TIFF has the background white turned off as a layered TIF.

What i want is that the PNG should have a clear background by default, is it possible ?

user580950
  • 3,558
  • 12
  • 49
  • 94

1 Answers1

1

I figured it out

$route  = "2.tif";
    $salida = '1.png';
    exec("convert $route $salida");
    exec("convert $salida -bordercolor white -border 1x1 \
         -alpha set -channel RGBA -fuzz 10% \
         -fill none -floodfill +0+0 white \
         -shave 1x1 $salida");
    exec("rm $route");
user580950
  • 3,558
  • 12
  • 49
  • 94