Goto main content

exif_read

Read exif information from a file

EXIF_READ

NAME

exif_read - Rwad exif information from an image file.

SYNOPSIS

exif_read (filename);

DESCRIPTION

This function is used to read exif information from an image 

This module use the library libexif from http://libexif.sourceforge.net/.

RETURN

An hash variable with all the value from exif.

MODULES

To use this module, you must specify the following in /usr/local/website/site.conf:

Module exif {
    Library : "/usr/local/lib/libsnexif.so"
    Init : "snexif_init"
}

EXAMPLES

existf("exif_read"); return true
a=exif_read("/html/tests/test1.jpg"); a.Orientation return Right-top
a=exif_read("/html/tests/test2.jpg"); a.Model}}. return NIKON D800
a=exif_read("/html/tests/test3.jpg"); a.Artist}}. return Pierre Laplante
a=exif_read("/html/tests/test4.jpg"); a.UserComment retur  Commentaire utilisateur
a=exif_read("/html/tests/pixel.gif"); a}}. return {}.

 

Here is a full list of parameters return from a file:

MeteringMode=Center-weighted average
PixelXDimension=4128
ExposureMode=Auto exposure
FlashPixVersion=FlashPix Version 1.0
ApertureValue=2.28 EV (f/2.2)
ImageLength=288
MakerNote=98 bytes undefined data
YCbCrPositioning=Centered
FocalLength=4.2 mm
ExposureTime=1/10 sec.
MaxApertureValue=2.28 EV (f/2.2)
Software=I337MVLUGOH1
Orientation=Right-top
XResolution=72
InteroperabilityVersion=0100
YResolution=72
Flash=Flash fired
Compression=JPEG compression
ExifVersion=Exif Version 2.2
UserComment=]B0-///1533444
ExposureProgram=Normal program
ResolutionUnit=Inch
InteroperabilityIndex=R98
ComponentsConfiguration=Y Cb Cr -
PixelYDimension=2322
DateTimeOriginal=2016:06:30 08:41:45
ImageWidth=512
SceneCaptureType=Standard
ImageUniqueID=O13F0SAGK01
WhiteBalance=Auto white balance
FocalLengthIn35mmFilm=31
LightSource=Unknown
DateTimeDigitized=2016:06:30 08:41:45
ColorSpace=sRGB
DateTime=2016:06:30 08:41:45
FNumber=f/2.2
SceneType=
Model=SGH-I337M
ISOSpeedRatings=50
BrightnessValue=1.61 EV (10.48 cd/m^2)
ExposureBiasValue=0.00 EV
SensingMethod=One-chip color area sensor
ShutterSpeedValue=3.34 EV (1/10 sec.)
Make=samsung

And another file:

MeteringMode=Spot
ExposureMode=Auto exposure
GainControl=High gain up
DigitalZoomRatio= 1
CustomRendered=Normal process
ApertureValue=5.31 EV (f/6.3)
FlashPixVersion=FlashPix Version 1.0
FocalLength=135.0 mm
ImageDescription=Legende
CFAPattern=8 bytes undefined data
FocalPlaneResolutionUnit=Centimeter
ExposureTime=1/30 sec.
MaxApertureValue=5.00 EV (f/5.7)
Software=Adobe Photoshop Lightroom 5.7.1 (Macintosh)
XResolution=72
YResolution=72
Contrast=Normal
Flash=Flash did not fire, compulsory flash mode
FileSource=DSC
SubSecTimeDigitized=90
ExifVersion=Exif Version 2.3
Compression=JPEG compression
UserComment=Commentaire utilisateur
ExposureProgram=Aperture priority
ResolutionUnit=Inch
Sharpness=Normal
Copyright=Copyright (c) Pierre Laplante (Photographer) - [None] (Editor)
FocalPlaneXResolution=2048.40222
DateTimeOriginal=2015:12:04 16:51:46
FocalPlaneYResolution=2048.40222
SceneCaptureType=Landscape
WhiteBalance=Auto white balance
FocalLengthIn35mmFilm=135
SubjectDistanceRange=Unknown
SubSecTimeOriginal=90
LightSource=Unknown
DateTimeDigitized=2015:12:04 16:51:46
Saturation=Normal
ColorSpace=Uncalibrated
DateTime=2016:07:14 09:30:24
FNumber=f/6.3
SceneType=Directly photographed
Model=NIKON D800
ISOSpeedRatings=6400
ExposureBiasValue=0.00 EV
Artist=Pierre Laplante
SensingMethod=One-chip color area sensor
ShutterSpeedValue=4.91 EV (1/30 sec.)
Make=NIKON CORPORATION

SEE ALSO

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2016-07-22 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.