image::imagemagick_identify (public)

 image::imagemagick_identify [ -filename filename ]

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

Get width height and mime type from imagemagick

Switches:
-filename (optional)
Full path to an image file in the filesystem
Returns:
List of width height mime_type
Author:
Dave Bauer <dave@solutiongrove.com>
Created:
2006-08-27

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

Testcases:
No testcase defined.
Source code:
    if { [ catch {set out [exec [image::identify_binary]  -format "%w %h %m %k %q %#" $filename]} errMsg]} {
        return -code error $errMsg
    }
    lassign $out width height type
    switch -- $type {
        JPG - JPEG {
            set mime_type image/jpeg
        }
        GIF - GIF87 {
            set mime_type image/gif
        }
        PNG {
            set mime_type image/png
        }
        TIF - TIFF {
            set mime_type image/tiff
        }
        default {
            set mime_type {}
        }
    }
    return [list $width $height $mime_type]
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: