src/ImageStack/Image.php
public static function get_type_from_mime_type($mimeType) {
        $types = [
            'image/jpeg' => 'jpg',
            'image/png' => 'png',
            'image/gif' => 'gif',
        ];
        if (isset($types[$mimeType])) return $types[$mimeType];
        throw new ImageException(sprintf('Unsupported MIME type: %s', $mimeType), ImageException::UNSUPPORTED_MIME_TYPE);
    }
public static function get_type_from_mime_type($mimeType) {
        $types = [
            'image/jpeg' => 'jpg',
            'image/png' => 'png',
            'image/gif' => 'gif',
        ];
        if (isset($types[$mimeType])) return $types[$mimeType];
        throw new ImageException(sprintf('Unsupported MIME type: %s', $mimeType), ImageException::UNSUPPORTED_MIME_TYPE);
    }
public static function get_type_from_mime_type ( $ mimeType ) { $ types = [ 'image/jpeg' => 'jpg' , 'image/png' => 'png' , 'image/gif' => 'gif' , ] ; if ( isset ( $ types [ $ mimeType ] ) ) return $ types [ $ mimeType ] ; throw new ImageException ( sprintf ( 'Unsupported MIME type: %s' , $ mimeType ) , ImageException :: UNSUPPORTED_MIME_TYPE ) ; }
Get the image short type from the MIME type.
@param string $mimeType
@return string
Get the image short type from the MIME type .