note 125195 added to imagick.getimagecompression
| From: | Mondragon@php.net | Date: | Thu, 16 Jul 2020 17:25:54 +0000 |
| Subject: | note 125195 added to imagick.getimagecompression | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214876@lists.php.net to get a copy of this message | ||
Example use:
$im = new Imagick("mypicture.jpg");
$ctype = $im->getImageCompression();
if($ctype == Imagick::COMPRESSION_ZIP) echo "PNG file!";
if($ctype == Imagick::COMPRESSION_JPEG) echo "JPG file!";
if($ctype == Imagick::COMPRESSION_LZW) echo "GIF file!";
All options:
COMPRESSION_UNDEFINED
COMPRESSION_NO
COMPRESSION_BZIP
COMPRESSION_FAX
COMPRESSION_GROUP4
COMPRESSION_JPEG
COMPRESSION_JPEG2000
COMPRESSION_LOSSLESSJPEG
COMPRESSION_LZW
COMPRESSION_RLE
COMPRESSION_ZIP
COMPRESSION_DXT1
COMPRESSION_DXT3
COMPRESSION_DXT5
COMPRESSION_ZIPS
COMPRESSION_PIZ
COMPRESSION_PXR24
COMPRESSION_B44
COMPRESSION_B44A
COMPRESSION_LZMA
COMPRESSION_JBIG1
COMPRESSION_JBIG2
The numbers for which those constants stand differ by version. So always use the constants.
----
Server IP: 45.112.84.4
Probable Submitter: 103.51.166.36 (proxied: 2001:1c00:2e1e:e700:c1b:c6f7:ba20:dcf4)
----
Manual Page -- http://php.net/manual/en/imagick.getimagecompression.php
Edit -- https://master.php.net/note/edit/125195
Del: integrated -- https://master.php.net/note/delete/125195/integrated
Del: useless -- https://master.php.net/note/delete/125195/useless
Del: bad code -- https://master.php.net/note/delete/125195/bad+code
Del: spam -- https://master.php.net/note/delete/125195/spam
Del: non-english -- https://master.php.net/note/delete/125195/non-english
Del: in docs -- https://master.php.net/note/delete/125195/in+docs
Del: other reasons-- https://master.php.net/note/delete/125195
Reject -- https://master.php.net/note/reject/125195
Search -- https://master.php.net/manage/user-notes.php