PHP 7.0.0 RC 1 Released

Imagick::queryFormats

(PECL imagick 2.0.0)

Imagick::queryFormatsReturns formats supported by Imagick

Description

array Imagick::queryFormats ([ string $pattern = "*" ] )

Returns formats supported by Imagick.

Parameters

pattern

Return Values

Returns an array containing the formats supported by Imagick.

Errors/Exceptions

Throws ImagickException on error.

Examples

Example #1 Imagick::queryFormats()

<?php
    
function render() {
        
$output "";
        
$input = \Imagick::queryformats();
        
$columns 6;

        
$output .= "<table border='2'>";

        for (
$i=0$i count($input); $i += $columns) {
            
$output .= "<tr>";
            for (
$c=0$c<$columns$c++) {
                
$output .= "<td>";
                if ((
$i $c) <  count($input)) {
                    
$output .= $input[$i $c];
                }
                
$output .= "</td>";
            }
            
$output .= "</tr>";
        }

        
$output .= "</table>";

        return 
$output;
    }

?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top