【问题标题】:Tiff to PNG adding a white background - ImagemagicTiff到PNG添加白色背景 - Imagemagick
【发布时间】:2013-02-06 14:04:10
【问题描述】:

我正在使用以下 imagemacgick 代码将 TIFF 转换为 PNG

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

TIFF 文件位于

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

转换后的 PNG 是 AT

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

TIFF 将背景白色作为分层 TIF 关闭。

我想要的是默认情况下PNG应该有一个清晰的背景,这可能吗?

【问题讨论】:

    标签: imagemagick imagemagick-convert


    【解决方案1】:

    我想通了

    $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");
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-05
      • 1970-01-01
      • 2011-12-04
      • 2018-03-25
      相关资源
      最近更新 更多