Fields

$image.src
-filename
$image.width
-width
$image.height
-height
$image.exif
-hash with EXIF information
$image.xmp
- string with XMP information (in XML format)


Keys of $image.exif are names of EXIF-tags, see specification (http://www.exif.org/specifications.html). Values may be of type string, int, double, date. When a tag has several values, they are turned into hash, with numbers as keys (0…number_of_values-1).

Frequently used EXIF-tags are (for detailed description see specification):
Tag
Type
Description
Make
string
Camera manufacturer
Model
string
Camera model
DateTimeOriginal
date
Shooting date and time
ExposureTime
double
Exposure time (in seconds)
FNumber
double
Aperture number F
Flash
int
0=was not used, other values=was used


Note: Keys of non-standard EXIF-tags are their values in decimal numbers.

Example

$photo[^image::measure[photo.jpg]]
Filename: $photo.src<br />
Image width in pixels: $photo.width
<br />
Image height in pixels: $photo.height
<br />
$date_time_original[$photo.exif.DateTimeOriginal]
^if(def $date_time_original){
    Picture taken on ^date_time_original.sql-string[]<br />
}

As a result, filename, as well as width and height of the image stored in this file will be output. If picture was taken with a digital camera, shooting date and time will most likely be output.


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 24.01.2021