mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
Document read_exif_data
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@29854 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d57ccad6e7
commit
2cb3d797cc
1 changed files with 70 additions and 0 deletions
|
@ -2108,6 +2108,76 @@ if (ImageTypes() & IMG_PNG) {
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.read_exif_data">
|
||||
<refnamediv>
|
||||
<refname>read_exif_data</refname>
|
||||
<refpurpose>Read the EXIF headers from a JPEG</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>array <function>read_exif_data</function></funcdef>
|
||||
<paramdef>string <parameter>filename</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
The <function>read_exif_data</function> function reads the
|
||||
EXIF headers from a JPEG image file. It returns an associative
|
||||
array where the indeces are the Exif header names and the values
|
||||
are the values associated with those Exif headers. Exif headers
|
||||
tend to be present in JPEG images generated by digital cameras, but
|
||||
unfortunately each digital camera maker has a different idea of how
|
||||
to actually tag their images, so you can't always rely on a specific
|
||||
Exif header being present.
|
||||
<example>
|
||||
<title>read_exif_data</title>
|
||||
<programlisting role="php">
|
||||
<?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
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<note>
|
||||
<simpara>
|
||||
This function is only available in PHP4 compiled using --enable-exif
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function does not require the GD image library.
|
||||
</simpara>
|
||||
</note>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue