Imagick::queryFormats

(PECL imagick 2.0.0)
Returns formats supported by Imagick
array Imagick::queryFormats ([ string $pattern = "*" ] )

Returns formats supported by Imagick.

Parameters:
pattern

Returns formats supported by Imagick.

Returns:

Returns an array containing the formats supported by Imagick.

Exception:

Throws ImagickException on error.

Examples:
Imagick::queryFormats()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?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;
    }
 
?>
doc_php
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.