我一直在尝试使用Ruby on Rails中的imagemagick库将CMYK格式的JPG图像转换为sRGB格式。
但不幸的是,通过以下命令观察到图像转换后图像质量下降:
MiniMagick::Tool::Convert.new do |convert|
convert << attachment.tempfile.path
convert.merge! ["-colorspace", "srgb"]
convert << attachment.tempfile.path
end这里有什么东西丢了吗?并期待着避免偏差。
请让我知道你的想法。
发布于 2016-07-26 06:49:14
您可以尝试使用ImageMagick -profile选项来实现更好的转换:
convert image.jpg -profile sRGB.icc rgb_image.jpg有关ImageMagick的更多详细信息,请查看here。
https://stackoverflow.com/questions/38569569
复制相似问题