【问题标题】:Imagemagick convert grayscale image to colorImagemagick 将灰度图像转换为彩色
【发布时间】:2020-12-16 20:23:18
【问题描述】:

我使用convert -size 1920x1080 xc:white white.png 创建了一个图像,但它似乎具有灰度颜色配置文件,这是不可取的。

identify -verbose 显示

色彩空间:灰色
类型:灰度

对于“普通”图像,这些属性似乎都没有被提及。

如何更改它以使图像具有颜色?

【问题讨论】:

    标签: imagemagick


    【解决方案1】:

    您可以像这样强制使用 RGB888 图像:

    convert -size 1920x1080 xc:white PNG24:white.png
    

    检查:

    identify -verbose white.png | egrep "Colorspace:|Type:"
    
    Colorspace: sRGB
    Type: Bilevel
    

    【讨论】:

      猜你喜欢
      • 2011-12-28
      • 1970-01-01
      • 1970-01-01
      • 2016-01-11
      • 2015-10-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多