imagemagick:转换 png 文件时颜色错误
imagemagick: wrong color during conversion of png file
我有一个 original image, and I want just to resize it, but during resizing, result 图像变得更红了。我尝试了很多参数,但没有一个有效。同样奇怪的是,在我的本地ubuntu上一切正常,问题只发生在CentOs服务器上;
这是我试过的:
convert fileForRedTest.png -background white -alpha remove fileForTest-result.png
convert fileForRedTest.png -colorspace RGB fileForRedTest-result.png
convert fileForRedTest.png -define png:bit-depth=16 fileForRedTest-result.png
convert fileForRedTest.png -define png:bit-depth=16 -define png:color-type=6 fileForRedTest-result.png
convert fileForRedTest.png png32:fileForRedTest-result.png
我没有足够的声誉来添加评论。
On Windows: IM 6.8.9 也造成了很多红色。升级到最新,6.9.3 解决了这个问题。我会再看一看目标机器上的二进制文件。
有两个原因:
- 旧版本的 lib(这就是我得到不同结果的原因)
- 这个参数:-define png:exclude-chunk=all -strip
我有一个 original image, and I want just to resize it, but during resizing, result 图像变得更红了。我尝试了很多参数,但没有一个有效。同样奇怪的是,在我的本地ubuntu上一切正常,问题只发生在CentOs服务器上;
这是我试过的:
convert fileForRedTest.png -background white -alpha remove fileForTest-result.png
convert fileForRedTest.png -colorspace RGB fileForRedTest-result.png
convert fileForRedTest.png -define png:bit-depth=16 fileForRedTest-result.png
convert fileForRedTest.png -define png:bit-depth=16 -define png:color-type=6 fileForRedTest-result.png
convert fileForRedTest.png png32:fileForRedTest-result.png
我没有足够的声誉来添加评论。 On Windows: IM 6.8.9 也造成了很多红色。升级到最新,6.9.3 解决了这个问题。我会再看一看目标机器上的二进制文件。
有两个原因:
- 旧版本的 lib(这就是我得到不同结果的原因)
- 这个参数:-define png:exclude-chunk=all -strip