Question about color-type command ?

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
jupitersea
Posts: 1
Joined: 2019-03-09T00:49:17-07:00
Authentication code: 1152

Question about color-type command ?

Post by jupitersea »

What commands can I use in Imagick to replicate this:

-define png:color-type=2

Thanks,
jupitersea
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Question about color-type command ?

Post by fmw42 »

It depends upon the image you have. If it is already RGB color, then nothing. If it is grayscale and you want to make it RGB, then simply add PNG24: as a preface to your output image.

Code: Select all

convert grayscale.suffix ...  PNG24:rgb.png

__________________

Please, always provide your IM version and platform when asking questions, since syntax may differ.

Also provide your exact command line and your images, if possible.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli


For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli
Post Reply