measure. Creating an object based on existing graphics file
^image::measure[file]
^image::measure[file_name]
Creates an object of class image, measuring dimensions of an existing graphics file or an object of class file in supported format (Parser presently supports GIF, JPEG and PNG formats).
Constructor measure also reads EXIF information stored in JPEG files (http://www.exif.org), if it is present. While creating JPEG file, most of today cameras also add information about the image, exposure parameters and other information in EXIF format.
The picture itself is not used-the constructor only keeps in memory the dimensions and the name of the file. Basic function of the constructor is to later call method html for the created object.
Parameters:
file-object of class file filename-filename with path
Note: supports EXIF 1.0 and reads tags IFD0 and SubIFD, if any.
Example of creating tag IMG with width and height attributes $photo[^image::measure[myphoto.png]]
^photo.html[] will create object photo of class image, based on existing graphics in PNG format. Tag IMG will be created with reference to the file and width and height specified.
Example of working with EXIF information
$image[^image::measure[jpg/DSC00003.JPG]]
$exif[$image.exif]
^if($exif){
Camera manufacturer, model: $exif.Make$exif.Model<br /> Shooting time: ^exif.DateTimeOriginal.sql-string[]<br /> Exposure time: $exif.ExposureTime seconds<br /> Aperture: F$exif.FNumber<br /> Flash used: ^if(def $exif.Flash){^if($exif.Flash){yes;no};not known}<br />
}{
No EXIF information<br />
}