Graphics function Library: read_exif_data

Source: Internet
Author: User
Keywords PHP Chinese function Handbook read_exif_data graphics function library
Tags aliyun array digital digital camera file function function library graphics

Read_exif_data

(PHP4 >= 4.0.1)

Read_exif_data---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; To read an EXIF header from a JPEG graphics file

Syntax: Array read_exif_data (string filename)

Description:

Read_exif_data () reads the EXIF header from the JPEG graphics file. It returns an array whose index value is the EXIF header name, and the value of the array is the value of those headers. Exif headers tend to be produced by digital cameras in JPEG graphics, but unfortunately, the various digital camera manufacturers have different ideas on how to actually label them, so you can't trust a specific EXIF header that currently exists.

Example:

<?php

$exif = Read_exif_data (' p0001807.jpg ');

while (list ($k, $v) =each ($exif)) {

echo "$k: $v <br>\n";

}

?>

Output:

FileName:p0001807.jpg

filedatetime:929353056

filesize:378599

Cameramake:eastman Kodak Company

Cameramodel:kodak DC265 ZOOM DIGITAL CAMERA (V01.00)

Datetime:1999:06:14 01:37:36

height:1024

width:1536

Iscolor:1

flashused:0

focallength:8.0mm

Rawfocallength:8

exposuretime:0.004 s (1/250)

rawexposuretime:0.0040000001899898

aperturefnumber:f/9.5

rawaperturefnumber:9.5100002288818

focusdistance:16.66m

rawfocusdistance:16.659999847412

Orientation:1

exifversion:0200

Note: You need to join--ENABLE-EXIF to use this function when compiling PHP

This function does not require the GD graphics library.

Related Article

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.