image::get_info (public)

 image::get_info -filename filename -array array

Defined in packages/acs-content-repository/tcl/image-procs.tcl

Get the width and height of an image file. The width and height are returned as 'height' and 'width' entries in the array named in the parameter. Uses ImageMagick instead of AOLserver function because it can handle more than just gifs and jpegs. The plan is to add the ability to get more details later. This proc duplicates and seems somehow superseded by image::imagemagick_identify, it might be a good idea to deprecate it in the future. One important difference is this proc won't fail in case of error.

Switches:
-filename
(required)
Name of the image file in the filesystem.
-array
(required)
Name of an array where you want the information returned.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 image::identify_binary image::identify_binary (public) image::get_info image::get_info image::get_info->image::identify_binary

Testcases:
No testcase defined.
Source code:
    upvar 1 $array row
    array set row {
        height {}
        width {}
    }

    catch {
        set identify_string [exec [image::identify_binary$filename]
        regexp {[ ]+([0-9]+)[x]([0-9]+)[\+]*} $identify_string x width height
        set row(width) $width
        set row(height) $height
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-content-repository/tcl/image-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: