protected function formatToCompressionType(string $format): int
    {
        if (!class_exists('Imagick')) {
            return 0; // Not possible.
        }
        switch (($ext = $this->formatToExt($format))) {
            case 'jpg':
                $type = \Imagick::COMPRESSION_JPEG;
                break;

            default:
                $type = \Imagick::COMPRESSION_UNDEFINED;
        }
        return $type;
    }
protected function formatToCompressionType(string $format): int
    {
        if (!class_exists('Imagick')) {
            return 0; // Not possible.
        }
        switch (($ext = $this->formatToExt($format))) {
            case 'jpg':
                $type = \Imagick::COMPRESSION_JPEG;
                break;

            default:
                $type = \Imagick::COMPRESSION_UNDEFINED;
        }
        return $type;
    }
protected function formatToCompressionType ( string $ format ) : int { if ( ! class_exists ( 'Imagick' ) ) { return 0 ; // Not possible. } switch ( ( $ ext = $ this -> formatToExt ( $ format ) ) ) { case 'jpg' : $ type = \ Imagick :: COMPRESSION_JPEG ; break ; default : $ type = \ Imagick :: COMPRESSION_UNDEFINED ; } return $ type ; }
Format to compression type.

@since 17xxxx Imagick utils.

@param string $format Image format.

@return int Format compression type.
Format to compression type .