Colors imagemagick:转换png文件时颜色错误

Colors imagemagick:转换png文件时颜色错误,colors,centos,imagemagick,png,rgb,Colors,Centos,Imagemagick,Png,Rgb,我有一个图像,我只想调整它的大小,但在调整大小的过程中,图像会变得更红。我试过很多params,但没有一个有效。同样奇怪的是,在我本地的ubuntu上一切正常,问题只发生在CentOs服务器上 这就是我所尝试的: convert fileForRedTest.png -background white -alpha remove fileForTest-result.png convert fileForRedTest.png -colorspace RGB fileForRedTest-re

我有一个图像,我只想调整它的大小,但在调整大小的过程中,图像会变得更红。我试过很多params,但没有一个有效。同样奇怪的是,在我本地的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

我没有足够的声誉来添加评论。
在Windows上:IM6.8.9也导致了大量的红色。升级到最新版本后,6.9.3修复了该问题。我想再看一眼目标机器上的二进制文件。

我没有足够的声誉来添加评论。 在Windows上:IM6.8.9也导致了大量的红色。升级到最新版本后,6.9.3修复了该问题。我想再看一眼目标机器上的二进制文件。

有两个原因:

  • 旧版本的lib(这就是为什么我得到了不同的结果)
  • 此参数:-define png:exclude chunk=all-strip
  • 原因有二:

  • 旧版本的lib(这就是为什么我得到了不同的结果)
  • 此参数:-define png:exclude chunk=all-strip

  • 您的本地服务器可能有不同版本的Imagemagick。如果是默认安装,则可能已过期三年或更长时间,并且Imagemagick正在持续开发中。我更新了版本,但问题仍然存在您的本地服务器可能有不同版本的Imagemagick。如果是默认安装,可能会过期三年或更长时间,Imagemagick正在持续开发中。我更新了版本,但问题仍然存在