PHP Get picture information exif

Source: Internet
Author: User
Tags mime file
Code:

$file _arr = Read_exif_data ('./1.png '); Var_dump ($file _arr);

Results:

Array (size=49) ' FileName ' = = String ' 2.png ' (length=5) ' filedatetime ' = = int 1446107171 ' FileSize ' + int 264 0955 ' FileType ' + int 2 ' MimeType ' and string ' Image/jpeg ' (length=10) ' sectionsfound ' = = String ' Any_tag, IFD 0, THUMBNAIL, EXIF, INTEROP ' (length=39) ' COMPUTED ' = = Array (size=12) ' html ' = = String ' width= ' 4128 ' Heig ht= "2322" ' (length=26) ' Height ' + int 2322 ' Width ' = = int 4128 ' iscolor ' = int 1 ' byteorder Motorola ' = ' + int 0 ' aperturefnumber ' = = String ' f/2.2 ' (length=5) ' usercomment ' + null ' Usercomme Ntencoding ' = = String ' ASCII ' (length=5) ' thumbnail.filetype ' + int 2 ' thumbnail.mimetype ' = = String '  Image/jpeg ' (length=10) ' thumbnail.height ' + int 288 ' thumbnail.width ' = = Int ' imagewidth ' = int  4128 ' imagelength ' = = int 2322 ' make ' + = String ' SAMSUNG ' (length=7) ' Model ' = = String ' gt-i9500 ' (length=8) ' Orientation ' = int 3 ' xresolution ' = = String ' 72/1 ' (length=4) ' yresolution ' = = String ' 72/1 ' (length=4) ' resolutionunit ' = int 2 ' software ' = = String ' I9500zcuhnd1 ' (length=12) ' DateTime ' = = String ' 2015:10:29 16:05:28 ' (length=19) ' YCBCRP ositioning ' = = int 1 ' exif_ifd_pointer ' = = int 226 ' THUMBNAIL ' = = Array (size=9) ' imagewidth ' = in T + ' imagelength ' + int 288 ' Compression ' = + int 6 ' Orientation ' + int 3 ' xresolution ' =& Gt String ' 72/1 ' (length=4) ' yresolution ' = = String ' 72/1 ' (length=4) ' resolutionunit ' + int 2 ' Jpegint Erchangeformat ' = = int 10570 ' jpeginterchangeformatlength ' + int 11304 ' exposuretime ' = = String ' 1/33 ' (le ngth=4) ' fnumber ' = = String ' 22/10 ' (length=5) ' exposureprogram ' + int 2 ' isospeedratings ' = ' = Int ' EXIFV Ersion ' = = String ' 0220 ' (length=4) ' datetimeoriginal ' = = String ' 2015:10:29 16:05:28 ' (length=19) ' Datetimedigiti Zed ' = = String ' 2015:10:29 16:05:28 ' (length=19) ' shutterspeedvalue ' + string ' 506/100 ' (length=7) ' aperturevalue ' = = String ' 227/  + ' (length=7) ' brightnessvalue ' + string ' 177/100 ' (length=7) ' exposurebiasvalue ' = = String ' 0/10 ' (length=4) ' Maxaperturevalue ' = = String ' 227/100 ' (length=7) ' meteringmode ' + int 2

Parameter description:

' filename ' = = $infoAll [' filename '], ' file modified time ' = ' date ' (' Y:m:d h:i:s ', $infoAll [' FileDateTime ']), ' File Size ' = ' Round ($infoAll [' FileSize ']/1024). ' KB ', ' exif file type ' = ' $this->getimgtype ($imgPath, ' exif '), ' mime file type ' = ' $infoAll [' MimeType ' ], ' find sections ' + $infoAll [' sectionsfound '], ' html image width ' = ' $infoAll [' html '], ' Picture height ' = ' and $infoAll [' height ']. ' px ', ' picture width ' = $infoAll [' width ']. ' px ', ' is color ' = = $infoAll [' iscolor '] = = 1? ' Yes ': ' No ', ' is the Motorola byte order ' = = $infoAll [' byteordermotorola '] = = 1?             ' Yes ': ' No ', ' aperture number ' = ' $infoAll [' aperturefnumber '], ' author notes ' = ' $infoAll [' Comments '], The ' author ' = $infoAll [' Author '], ' user notes ' and ' usercomment ', ' user comment code ' + $infoAll [' Use Rcommentencoding '], ' thumbnail Exif file type ' = $this->getimgtype ($imgPath, ' Exif '), ' thumbnail mime file type ' =&Gt             $infoAll [' Thumbnail.mimetype '], ' manufacturer ' and ' = ' $infoAll [' make '], ' model ' + $infoAll [' model '],  ' Direction ' = + array_search ($infoAll [' Orientation '],array (' top left side ' = 1, ' Top                 Right side ' = 2, ' bottom right side ' = 3, ' bottom left side ' and 4,                 ' left side top ' = 5, ' right side top ' = 6, ' right side bottom ' + 7, ' Left side bottom ' + 8), ' horizontal resolution ' = = $infoAll [' xresolution '], ' vertical resolution '                 Rate ' = ' $infoAll [' yresolution '], ' resolution units ' = Array_search ($infoAll [' Resolutionunit '],array ( ' no unit ' = = 1, ' inch ' = + 2, ' cm ' + 3 '), ' create software ' = $infoA ll[' software '], ' last modified time ' = $infoAll [' DateTime '], ' ycbcr position control ' and ' = ' $infoAll [' ycbcrpositioning ' ] = = 1? ' Center of Pixel Array ': ' Datum point ', ' Exif image of IFD ' pointer ' = = $INFOALL [' Exif_ifd_pointer '], ' compression method ' and ' = ' $infoAll [' Compression '] = = 6? ' JPEG compression ': ' Uncompressed ', ' jpeg soi offset ' = ' $infoAll [' Jpeginterchangeformat '], ' jpeg data bytes ' = = $infoAll [ ' Jpeginterchangeformatlength ', ' exposure time ' = $infoAll [' Exposuretime ']. ' seconds ', ' focal length ratio ' = ' $infoAll [' fnumber '], ' exposure program ' = Array_search ($infoAll [' Exposureprogram '],array (' manual control ' = + 1, ' program controlled ' = + 2, ' aperture priority ' = + 3, ' shutter priority ' = > 4, ' Depth of field preferred ' = 5, ' Sport mode ' + 6, ' portrait mode ' = 7, ' Wind (8), ' iso sensitivity ' = $infoAll [' isospeedratings '], ' EXIF version ' and ' = ' $infoAll [' Exifversion '], ' shooting time ' = ' $infoAll [' datetimeoriginal '], ' digital time ' and $infoAll [' Datetimedigitize d '], ' component configuration ' = = $infoAll [' ComponentsconfiguRation '], ' image compression ratio ' =-$infoAll [' Compressedbitsperpixel '], ' exposure compensation ' = ' $infoAll [' Exposurebiasval UE ']. ' Electron volts ', ' maximum aperture value ' = $infoAll [' Maxaperturevalue '], ' metering mode ' = Array_search ($infoAll [' Meteringmo                 De '],array (' unknown ' = = 0, ' average ' = = 1, ' center-weighted ' average metering ' = 2,                 ' Point Test ' = 3, ' partition ' = 4, ' Evaluate ' = 5, ' Partial ' = 6, ' Other ' = 255), ' light source ' = Array_search ($infoAll [' LightSource '],array (' unknown ' =&G T 0, ' fluorescent lamps ' and 1, ' fluorescent ' + 2, ' tungsten filament ' and 3, ' Flash ' =&gt ;                 10, ' standard light a ' = + 17, ' Standard light B ' + 18, ' standard light c ' = 19,             ' D55 ' and ' D65 ', ' D75 ' and ' 22, ' others ' and ' = 255,       )),      ' Flash ' = Array_search ($infoAll [' Flash '],array (' flash not flash ' = 0, ' Flash has been flashing ' = 1             , ' The flash has been flashing but the strobe has not detected a return light ' = 5, ' The Flash has been flashing, the strobe has detected a return light ' = 7 '), ' focal length ' = $infoAll [' FocalLength '].             ' mm ', ' sub-second time ' = = $infoAll [' subsectime '], ' sub-second shooting time ' and $infoAll [' subsectimeoriginal '],             ' Sub-second digital time ' + $infoAll [' subsectimedigitized '], ' flashpix version ' = ' + $infoAll [' flashpixversion '], ' color space ' = = $infoAll [' colorspace '] = = 1? ' SRGB ': ' uncalibrated ', ' exif image width ' = $infoAll [' Exifimagewidth ']. ' px ', ' exif image height ' = $infoAll [' Exifimagelength ']. ' px ', ' IFD format data offset ' = $infoAll [' Interoperabilityoffset '], ' color zone sensor type ' = ' Sensingme Thod '] = = 2? ' Monochrome sensor ': ' Other ', ' image source ' = ' $infoAll [' filesource '] = = ' 0x03 '? ' Digital camera ': ' Other ', ' scene type ' = = $infoAll [' scenetype '] = = ' 0x01 '?             ' Shoot straight ': ' Other ', ' filter array pattern ' + $infoAll [' Cfapattern '], ' custom image processing ' + $infoAll [' customrendered '], ' exposure mode ' = = $infoAll [' customrendered '] = = 1? ' Manual ': ' Automatic ', ' white balance ' = ' $infoAll [' whitebalance '] = = 1? ' Manual ': ' Auto ', ' digital zoom ' = = $infoAll [' Digitalzoomratio '], ' equivalent 35mm focal length ' = ' Focallengthin 35mmFilm '].                 ' mm ', ' Framing mode ' and ' Array_search ' ($infoAll [' Scenecapturetype '],array (' auto ' + = 0,                 ' Portrait scene ' + 1, ' landscape scene ' = + 2, ' Sports scene ' + 3, ' Night View ' + 4,  ' AE ' = 5, ' aperture priority AE ' + 256, ' Shutter priority AE ' + 512, ' manual exposure ' + 768,)), ' gain control ' = $infoAll [' Gaincontrol '], ' contrast ' = Array_search ($infoAl         l[' contrast '],array (' low ' =-1, ' normal ' = + 0, ' high ' = 1    ), ' saturation ' = Array_search ($infoAll [' Saturation '],array (' low ' =-1, '                  Normal ' = + 0, ' high ' = 1), ' sharpness ' = Array_search ($infoAll [' Sharpness '],array ( ' Low ' =-1, ' normal ' = + 0, ' high ' = 1 '), ' focus distance                 ' = = Array_search ($infoAll [' Subjectdistancerange '],array (' unknown ' = ' 0, ' macro ' = + 1, ' Close-up ' = 2, ' vision ' + 3 '), ' Interoperability index ' and ' $INFOALL [  ' Interoperabilityindex ', ' interoperability version ' = ' $infoAll [' interoperabilityversion ']

The above describes the PHP access to image information Exif, including the content of the text, I hope that the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.