pa_file_info (public)
pa_file_info file
Defined in packages/photo-album/tcl/photo-album-procs.tcl
return the image information from a given file
- Parameters:
- file (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set info [list] if { [catch {set size [file size $file]} errMsg] } { return -code error $errMsg } if { [ catch {set out [exec [parameter::get -parameter ImageMagickPath]/identify -format "%w %h %m %k %q %#" $file]} errMsg]} { return -code error $errMsg } foreach {width height type colors quantum sha256} [split $out { }] {} switch $type { JPG - JPEG { set mime image/jpeg } GIF - GIF87 { set mime image/gif } PNG { set mime image/png } TIF - TIFF { set mime image/tiff } default { set mime {} } } return [list $size $width $height $type $mime $colors $quantum [string trim $sha256]]Generic XQL file: packages/photo-album/tcl/photo-album-procs.xql
PostgreSQL XQL file: packages/photo-album/tcl/photo-album-procs-postgresql.xql
Oracle XQL file: packages/photo-album/tcl/photo-album-procs-oracle.xql