Code: Select all
$ magick -version
Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-04-17 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo djvu fftw flif fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps raw rsvg tiff webp wmf xml zlib
Code: Select all
-define colorspace:auto-grayscale=false
First, create test input image like this:
Code: Select all
$ magick logo: -colorspace Gray tiff:- | magick - -type TrueColor logo.tif
$ magick identify logo.tif
logo.tif TIFF 640x480 640x480+0+0 8-bit sRGB 52498B 0.000u 0:00.000
Code: Select all
$ magick logo.tif -define colorspace:auto-grayscale=false result.tif
$ magick identify result.tif
result.tif TIFF 640x480 640x480+0+0 8-bit Grayscale Gray 33432B 0.000u 0:00.000
Code: Select all
$ magick logo.tif -set colorspace:auto-grayscale false result2.tif
$ magick identify result2.tif
result2.tif TIFF 640x480 640x480+0+0 8-bit sRGB 52498B 0.000u 0:00.000
PS
same result with the newest version.
Code: Select all
c:\tmp>magick -version
Version: ImageMagick 7.0.8-6 Q16 x64 2018-07-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr
lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib