Imagemagick 将灰度图像转换为彩色
Imagemagick convert grayscale image to color
我用 convert -size 1920x1080 xc:white white.png
创建了一个图像,但它似乎有一个灰度颜色配置文件,这是不受欢迎的。
identify -verbose
显示
Colorspace: Gray
Type: Grayscale
对于“普通”图像,这些属性似乎甚至都没有被提及。
我怎样才能改变它,使图像可以有颜色?
您可以像这样强制使用 RGB888 图像:
convert -size 1920x1080 xc:white PNG24:white.png
检查:
identify -verbose white.png | egrep "Colorspace:|Type:"
Colorspace: sRGB
Type: Bilevel
我用 convert -size 1920x1080 xc:white white.png
创建了一个图像,但它似乎有一个灰度颜色配置文件,这是不受欢迎的。
identify -verbose
显示
Colorspace: Gray
Type: Grayscale
对于“普通”图像,这些属性似乎甚至都没有被提及。
我怎样才能改变它,使图像可以有颜色?
您可以像这样强制使用 RGB888 图像:
convert -size 1920x1080 xc:white PNG24:white.png
检查:
identify -verbose white.png | egrep "Colorspace:|Type:"
Colorspace: sRGB
Type: Bilevel