note 124850 added to imagick.setimagetype
| From: | SimonJ@php.net | Date: | Tue, 24 Mar 2020 12:55:24 +0000 |
| Subject: | note 124850 added to imagick.setimagetype | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214371@lists.php.net to get a copy of this message | ||
The different image types that can be specified are (from the Imagick::getImageType doc page):
Imagick::IMGTYPE_UNDEFINED
Imagick::IMGTYPE_BILEVEL
Imagick::IMGTYPE_GRAYSCALE
Imagick::IMGTYPE_GRAYSCALEMATTE
Imagick::IMGTYPE_PALETTE
Imagick::IMGTYPE_PALETTEMATTE
Imagick::IMGTYPE_TRUECOLOR
Imagick::IMGTYPE_TRUECOLORMATTE
Imagick::IMGTYPE_COLORSEPARATION
Imagick::IMGTYPE_COLORSEPARATIONMATTE
Imagick::IMGTYPE_OPTIMIZE
The MATTE variants are equivalent to GrayscaleAlpha, etc. in the ImageMagick command line. If
you're making something grayscale, I would recommend using IMGTYPE_GRAYSCALEMATTE.
<?php
$im->setImageType(Imagick::IMGTYPE_GRAYSCALEMATTE);
?>
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.195 (proxied: 81.109.86.207)
----
Manual Page -- http://php.net/manual/en/imagick.setimagetype.php
Edit -- https://master.php.net/note/edit/124850
Del: integrated -- https://master.php.net/note/delete/124850/integrated
Del: useless -- https://master.php.net/note/delete/124850/useless
Del: bad code -- https://master.php.net/note/delete/124850/bad+code
Del: spam -- https://master.php.net/note/delete/124850/spam
Del: non-english -- https://master.php.net/note/delete/124850/non-english
Del: in docs -- https://master.php.net/note/delete/124850/in+docs
Del: other reasons-- https://master.php.net/note/delete/124850
Reject -- https://master.php.net/note/reject/124850
Search -- https://master.php.net/manage/user-notes.php