[FIELDSET][LEGEND]引自:1楼[/LEGEND]
在PHP中获取exif信息,应用exif函数库。
在php.ini中加载extension=php_exif.dll。去掉分号,重新启动Apache。
然后应用exif_read_data()函数就可以获取到照片中的一些信息。
[/FIELDSET]
回复:
谢谢老师。
想请教一下,那些资讯是直拍/横拍的描述?
资讯如下:
FILE.FileName: IMG_3010.JPG
FILE.FileDateTime: 1332067870
FILE.FileSize: 2475608
FILE.FileType: 2
FILE.MimeType: image/jpeg
FILE.SectionsFound: ANY_TAG, IFD0, THUMBNAIL, EXIF, INTEROP, MAKERNOTE
COMPUTED.html: width="3888" height="2592"
COMPUTED.Height: 2592
COMPUTED.Width: 3888
COMPUTED.IsColor: 1
COMPUTED.ByteOrderMotorola: 0
COMPUTED.CCDWidth: 22mm
COMPUTED.ApertureFNumber: f/2.8
COMPUTED.UserComment:
COMPUTED.UserCommentEncoding: UNDEFINED
COMPUTED.Thumbnail.FileType: 2
COMPUTED.Thumbnail.MimeType: image/jpeg
IFD0.Make: Canon
IFD0.Model: Canon EOS 400D DIGITAL
IFD0.Orientation: 8
IFD0.XResolution: 72/1
IFD0.YResolution: 72/1
IFD0.ResolutionUnit: 2
IFD0.DateTime: 2012:03:18 18:51:09
IFD0.YCbCrPositioning: 2
IFD0.Exif_IFD_Pointer: 196
THUMBNAIL.Compression: 6
THUMBNAIL.XResolution: 72/1
THUMBNAIL.YResolution: 72/1
THUMBNAIL.ResolutionUnit: 2
THUMBNAIL.JPEGInterchangeFormat: 6132
THUMBNAIL.JPEGInterchangeFormatLength: 5743
EXIF.ExposureTime: 1/15
EXIF.FNumber: 28/10
EXIF.ExposureProgram: 1
EXIF.ISOSpeedRatings: 100
EXIF.ExifVersion: 0221
EXIF.DateTimeOriginal: 2012:03:18 18:51:09
EXIF.DateTimeDigitized: 2012:03:18 18:51:09
EXIF.ComponentsConfiguration:
EXIF.ShutterSpeedValue: 256042/65536
EXIF.ApertureValue: 194698/65536
EXIF.ExposureBiasValue: 0/3
EXIF.MeteringMode: 5
EXIF.Flash: 16
EXIF.FocalLength: 55/1
EXIF.MakerNote: .ìHP"X œ ¼ Ü€£ ü4 6€üL ƒ“T •@v