ztk::photo orientation
Gives the EXIF orientation of the bytes of an image file.
ztk::photo orientation DATA
Description
DATA is the bytes of a JPEG file, with the orientation in its Exif segment APP1, or of a PNG file, with the orientation in its chunk eXIf. Gives 1 to 8, the value of the TIFF tag 274, or 1 when there is none. A script reads the file with fconfigure $f -translation binary, or gets the bytes from a picker.
Returns
An integer from 1 to 8.
Examples
% ztk::photo orientation {not an image}
1
Errors
% ztk::photo orientation
wrong # args: should be "ztk::photo orientation data"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.10