Imagick::getImageCompression

(PECL imagick 2.2.2)

Imagick::getImageCompressionGets the current image's compression type

Description

int Imagick::getImageCompression ( void )

Gets the current image's compression type.

Return Values

Returns the compression constant

Коментарии

This function is undefined. You must use getImageCompressionQuality() instead.
2013-07-03 13:44:30
http://php5.kiev.ua/manual/ru/imagick.getimagecompression.html
This function is added in version 3.3.0 and above
2017-10-20 15:51:55
http://php5.kiev.ua/manual/ru/imagick.getimagecompression.html
Автор:
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.
2020-07-16 20:25:54
http://php5.kiev.ua/manual/ru/imagick.getimagecompression.html

    Поддержать сайт на родительском проекте КГБ