philip Sun Jul 25 19:08:33 2004 EDT
Added files:
/phpdoc/en/reference/exif configure.xml constants.xml ini.xml
reference.xml
/phpdoc/en/reference/exif/functions exif-imagetype.xml
exif-read-data.xml
exif-tagname.xml
exif-thumbnail.xml
read-exif-data.xml
Removed files:
/phpdoc/en/reference/image/functions exif-thumbnail.xml
exif-imagetype.xml
exif-read-data.xml
read-exif-data.xml
Modified files:
/phpdoc/en/reference/image ini.xml
Log:
Moved exif functions out of ref.image and into new ref.exif, added appropriate files.
Modified all exif docs to use new refsect1/reftitle syntax.
http://cvs.php.net/diff.php/phpdoc/en/reference/image/ini.xml?r1=1.5&r2=1.6&ty=u
Index: phpdoc/en/reference/image/ini.xml
diff -u phpdoc/en/reference/image/ini.xml:1.5 phpdoc/en/reference/image/ini.xml:1.6
--- phpdoc/en/reference/image/ini.xml:1.5 Wed Jul 7 06:03:22 2004
+++ phpdoc/en/reference/image/ini.xml Sun Jul 25 19:08:32 2004
@@ -1,163 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<section id="image.configuration">
&reftitle.runtime;
- &extension.runtime;
<para>
- Exif supports automatically conversion for Unicode and JIS
- character encodings of user comments when module
- <link linkend="ref.mbstring">mbstring</link>
- is available. This is done by first decoding the comment
- using the specified characterset. The result is then encoded
- with another characterset which should match your
- <literal>HTTP</literal> output.
- <table>
- <title>Exif configuration options</title>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Default</entry>
- <entry>Changeable</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>exif.encode_unicode</entry>
- <entry>"ISO-8859-15"</entry>
- <entry>PHP_INI_ALL</entry>
- </row>
- <row>
- <entry>exif.decode_unicode_motorola</entry>
- <entry>"UCS-2BE"</entry>
- <entry>PHP_INI_ALL</entry>
- </row>
- <row>
- <entry>exif.decode_unicode_intel</entry>
- <entry>"UCS-2LE"</entry>
- <entry>PHP_INI_ALL</entry>
- </row>
- <row>
- <entry>exif.encode_jis</entry>
- <entry>""</entry>
- <entry>PHP_INI_ALL</entry>
- </row>
- <row>
- <entry>exif.decode_jis_motorola</entry>
- <entry>"JIS"</entry>
- <entry>PHP_INI_ALL</entry>
- </row>
- <row>
- <entry>exif.decode_jis_intel</entry>
- <entry>"JIS"</entry>
- <entry>PHP_INI_ALL</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- For further details and definition of the PHP_INI_* constants see
- <function>ini_set</function>.
- </para>
-
- &ini.descriptions.title;
-
- <para>
- <variablelist>
- <varlistentry id="ini.exif.encode-unicode">
- <term>
- <parameter>exif.encode_unicode</parameter>
- <type>string</type>
- </term>
- <listitem>
- <para>
- <literal>exif.encode_unicode</literal> defines the
- characterset UNICODE user comments are handled.
- This defaults to ISO-8859-15 which should work for
- most non Asian countries. The setting can be empty
- or must be an encoding supported by mbstring. If it
- is empty the current internal encoding of mbstring is
- used.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry id="ini.exif.decode-unicode-motorola">
- <term>
- <parameter>exif.decode_unicode_motorola</parameter>
- <type>string</type>
- </term>
- <listitem>
- <para>
- <literal>exif.decode_unicode_motorola</literal> defines
- the image internal characterset for Unicode encoded user
- comments if image is in motorola byte order (big-endian).
- This setting cannot be empty but you can specify a list
- of encodings supported by mbstring. The default is UCS-2BE.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry id="ini.exif.decode-unicode-intel">
- <term>
- <parameter>exif.decode_unicode_intel</parameter>
- <type>string</type>
- </term>
- <listitem>
- <para>
- <literal>exif.decode_unicode_intel</literal> defines
- the image internal characterset for Unicode encoded user
- comments if image is in intel byte order (little-endian).
- This setting cannot be empty but you can specify a list
- of encodings supported by mbstring. The default is UCS-2LE.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry id="ini.exif.encode-jis">
- <term>
- <parameter>exif.encode_jis</parameter>
- <type>string</type>
- </term>
- <listitem>
- <para>
- <literal>exif.encode_jis</literal> defines the
- characterset JIS user comments are handled.
- This defaults to an empty value which forces
- the functions to use the current internal encoding
- of mbstring.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry id="ini.exif.decode-jis-motorola">
- <term>
- <parameter>exif.decode_jis_motorola</parameter>
- <type>string</type>
- </term>
- <listitem>
- <para>
- <literal>exif.decode_jis_motorola</literal> defines
- the image internal characterset for JIS encoded user
- comments if image is in motorola byte order (big-endian).
- This setting cannot be empty but you can specify a list
- of encodings supported by mbstring. The default is JIS.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry id="ini.exif.decode-jis-intel">
- <term>
- <parameter>exif.decode_jis_intel</parameter>
- <type>string</type>
- </term>
- <listitem>
- <para>
- <literal>exif.decode_jis_intel</literal> defines
- the image internal characterset for JIS encoded user
- comments if image is in intel byte order (little-endian).
- This setting cannot be empty but you can specify a list
- of encodings supported by mbstring. The default is JIS.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ There are no image specific configurations but you may be interested in the
+ <link linkend="ref.exif">exif extension</link> directives.
</para>
</section>
+
<!-- Keep this comment at the end of the file
Local variables:
http://cvs.php.net/co.php/phpdoc/en/reference/exif/configure.xml?r=1.1&p=1
Index: phpdoc/en/reference/exif/configure.xml
+++ phpdoc/en/reference/exif/configure.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<section id="exif.installation">
&reftitle.install;
<para>
To enable exif-support configure PHP with
<option role="configure">--enable-exif</option>
</para>
<para>
Windows users must enable both the <filename>php_mbstring.dll</filename>
and <filename>php_exif.dll</filename> DLL's in &php.ini;. The
<filename>php_mbstring.dll</filename> DLL must be loaded
<emphasis>before</emphasis> the <filename>php_exif.dll</filename> DLL so
adjust your &php.ini; accordingly.
</para>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/exif/constants.xml?r=1.1&p=1
Index: phpdoc/en/reference/exif/constants.xml
+++ phpdoc/en/reference/exif/constants.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<section id="exif.constants">
&reftitle.constants;
&extension.constants;
<para>
<variablelist>
<varlistentry>
<term>
<constant>EXIF_USE_MBSTRING</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
The <function>exif_imagetype</function> lists several related built-in
constants.
</para>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/exif/ini.xml?r=1.1&p=1
Index: phpdoc/en/reference/exif/ini.xml
+++ phpdoc/en/reference/exif/ini.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<section id="exif.configuration">
&reftitle.runtime;
&extension.runtime;
<para>
Exif supports automatically conversion for Unicode and JIS
character encodings of user comments when module
<link linkend="ref.mbstring">mbstring</link>
is available. This is done by first decoding the comment
using the specified characterset. The result is then encoded
with another characterset which should match your
<literal>HTTP</literal> output.
<table>
<title>Exif configuration options</title>
<tgroup cols="3">
<thead>
<row>
<entry>Name</entry>
<entry>Default</entry>
<entry>Changeable</entry>
</row>
</thead>
<tbody>
<row>
<entry>exif.encode_unicode</entry>
<entry>"ISO-8859-15"</entry>
<entry>PHP_INI_ALL</entry>
</row>
<row>
<entry>exif.decode_unicode_motorola</entry>
<entry>"UCS-2BE"</entry>
<entry>PHP_INI_ALL</entry>
</row>
<row>
<entry>exif.decode_unicode_intel</entry>
<entry>"UCS-2LE"</entry>
<entry>PHP_INI_ALL</entry>
</row>
<row>
<entry>exif.encode_jis</entry>
<entry>""</entry>
<entry>PHP_INI_ALL</entry>
</row>
<row>
<entry>exif.decode_jis_motorola</entry>
<entry>"JIS"</entry>
<entry>PHP_INI_ALL</entry>
</row>
<row>
<entry>exif.decode_jis_intel</entry>
<entry>"JIS"</entry>
<entry>PHP_INI_ALL</entry>
</row>
</tbody>
</tgroup>
</table>
For further details and definition of the PHP_INI_* constants see
<function>ini_set</function>.
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry id="ini.exif.encode-unicode">
<term>
<parameter>exif.encode_unicode</parameter>
<type>string</type>
</term>
<listitem>
<para>
<literal>exif.encode_unicode</literal> defines the
characterset UNICODE user comments are handled.
This defaults to ISO-8859-15 which should work for
most non Asian countries. The setting can be empty
or must be an encoding supported by mbstring. If it
is empty the current internal encoding of mbstring is
used.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.exif.decode-unicode-motorola">
<term>
<parameter>exif.decode_unicode_motorola</parameter>
<type>string</type>
</term>
<listitem>
<para>
<literal>exif.decode_unicode_motorola</literal> defines
the image internal characterset for Unicode encoded user
comments if image is in motorola byte order (big-endian).
This setting cannot be empty but you can specify a list
of encodings supported by mbstring. The default is UCS-2BE.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.exif.decode-unicode-intel">
<term>
<parameter>exif.decode_unicode_intel</parameter>
<type>string</type>
</term>
<listitem>
<para>
<literal>exif.decode_unicode_intel</literal> defines
the image internal characterset for Unicode encoded user
comments if image is in intel byte order (little-endian).
This setting cannot be empty but you can specify a list
of encodings supported by mbstring. The default is UCS-2LE.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.exif.encode-jis">
<term>
<parameter>exif.encode_jis</parameter>
<type>string</type>
</term>
<listitem>
<para>
<literal>exif.encode_jis</literal> defines the
characterset JIS user comments are handled.
This defaults to an empty value which forces
the functions to use the current internal encoding
of mbstring.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.exif.decode-jis-motorola">
<term>
<parameter>exif.decode_jis_motorola</parameter>
<type>string</type>
</term>
<listitem>
<para>
<literal>exif.decode_jis_motorola</literal> defines
the image internal characterset for JIS encoded user
comments if image is in motorola byte order (big-endian).
This setting cannot be empty but you can specify a list
of encodings supported by mbstring. The default is JIS.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.exif.decode-jis-intel">
<term>
<parameter>exif.decode_jis_intel</parameter>
<type>string</type>
</term>
<listitem>
<para>
<literal>exif.decode_jis_intel</literal> defines
the image internal characterset for JIS encoded user
comments if image is in intel byte order (little-endian).
This setting cannot be empty but you can specify a list
of encodings supported by mbstring. The default is JIS.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/exif/reference.xml?r=1.1&p=1
Index: phpdoc/en/reference/exif/reference.xml
+++ phpdoc/en/reference/exif/reference.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<reference id="ref.exif">
<title>Exif Functions</title>
<titleabbrev>Exif</titleabbrev>
<partintro>
<section id="exif.intro">
&reftitle.intro;
<para>
With the exif extension you are able to work with image meta data. For
example, you may use exif functions to read meta data of pictures taken
from digital cameras by working with information stored in the headers of
the <acronym>JPEG</acronym> and <acronym>TIFF</acronym> images.
</para>
</section>
<section id="exif.requirements">
&reftitle.required;
<para>
Your PHP must be compiled in with <literal>--enable-exif</literal>.
The <acronym>GD</acronym> library is not required for the exif
extension. Window users must also have the <link linkend="ref.mbstring">
mbstring</link> extension enabled.
</para>
</section>
&reference.exif.configure;
&reference.exif.ini;
<section id="exif.resources">
&reftitle.resources;
&no.resource;
</section>
&reference.exif.constants;
</partintro>
&reference.exif.functions;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/exif/functions/exif-imagetype.xml?r=1.1&p=1
Index: phpdoc/en/reference/exif/functions/exif-imagetype.xml
+++ phpdoc/en/reference/exif/functions/exif-imagetype.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.81 -->
<refentry id="function.exif-imagetype">
<refnamediv>
<refname>exif_imagetype</refname>
<refpurpose>Determine the type of an image</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>exif_imagetype</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
<function>exif_imagetype</function> reads the first bytes of an image and
checks its signature.
</para>
<note>
<para>
Support for <acronym>JPC</acronym>, <acronym>JP2</acronym>,
<acronym>JPX</acronym>, <acronym>JB2</acronym>,
<acronym>XBM</acronym>, and <acronym>WBMP</acronym> became available in
PHP 4.3.2. Support for <acronym>SWC</acronym> as of PHP 4.3.0.
</para>
</note>
<para>
This function can be used to avoid calls to other exif functions with
unsupported file types or in conjunction with
<varname>$_SERVER['HTTP_ACCEPT']</varname> to check whether or
not the viewer is able to see a specific image in the browser.
</para>
</refsect1>
<refsect1>
&reftitle.constants;
<para>
The following constants are defined and represent possible
<function>exif_imagetype</function> return values:
<table>
<title>Imagetype Constants</title>
<tgroup cols="2">
<thead>
<row>
<entry>Value</entry>
<entry>Constant</entry>
</row>
</thead>
<tbody>
<row>
<entry>1</entry>
<entry><constant>IMAGETYPE_GIF</constant></entry>
</row>
<row>
<entry>2</entry>
<entry><constant>IMAGETYPE_JPEG</constant></entry>
</row>
<row>
<entry>3</entry>
<entry><constant>IMAGETYPE_PNG</constant></entry>
</row>
<row>
<entry>4</entry>
<entry><constant>IMAGETYPE_SWF</constant></entry>
</row>
<row>
<entry>5</entry>
<entry><constant>IMAGETYPE_PSD</constant></entry>
</row>
<row>
<entry>6</entry>
<entry><constant>IMAGETYPE_BMP</constant></entry>
</row>
<row>
<entry>7</entry>
<entry><constant>IMAGETYPE_TIFF_II</constant> (intel byte order)</entry>
</row>
<row>
<entry>8</entry>
<entry>
<constant>IMAGETYPE_TIFF_MM</constant> (motorola byte order)
</entry>
</row>
<row>
<entry>9</entry>
<entry><constant>IMAGETYPE_JPC</constant></entry>
</row>
<row>
<entry>10</entry>
<entry><constant>IMAGETYPE_JP2</constant></entry>
</row>
<row>
<entry>11</entry>
<entry><constant>IMAGETYPE_JPX</constant></entry>
</row>
<row>
<entry>12</entry>
<entry><constant>IMAGETYPE_JB2</constant></entry>
</row>
<row>
<entry>13</entry>
<entry><constant>IMAGETYPE_SWC</constant></entry>
</row>
<row>
<entry>14</entry>
<entry><constant>IMAGETYPE_IFF</constant></entry>
</row>
<row>
<entry>15</entry>
<entry><constant>IMAGETYPE_WBMP</constant></entry>
</row>
<row>
<entry>16</entry>
<entry><constant>IMAGETYPE_XBM</constant></entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</refsect1>
<refsect1>
&reftitle.returnvalues;
<para>
When a correct signature is found the appropriate constant value will be
returned otherwise the return value is &false;. The return value is the
same value that <function>getimagesize</function> returns in index 2 but
this function is much faster.
</para>
</refsect1>
<refsect1>
&reftitle.examples;
<para>
<example>
<title><function>exif_imagetype</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
if (exif_imagetype("image.gif") != IMAGETYPE_GIF) {
echo "The picture is not a gif";
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<function>getimagesize</function>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/exif/functions/exif-read-data.xml?r=1.1&p=1
Index: phpdoc/en/reference/exif/functions/exif-read-data.xml
+++ phpdoc/en/reference/exif/functions/exif-read-data.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.78 -->
<refentry id="function.exif-read-data">
<refnamediv>
<refname>exif_read_data</refname>
<refpurpose>Reads the <acronym>EXIF</acronym> headers from <acronym>JPEG</acronym>
or <acronym>TIFF</acronym></refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>exif_read_data</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>sections</parameter></methodparam>
<methodparam
choice="opt"><type>bool</type><parameter>arrays</parameter></methodparam>
<methodparam
choice="opt"><type>bool</type><parameter>thumbnail</parameter></methodparam>
</methodsynopsis>
<para>
The <function>exif_read_data</function> function reads the
<acronym>EXIF</acronym> headers from a <acronym>JPEG</acronym> or
<acronym>TIFF</acronym> image file. This way you can read meta data
generated by digital cameras.
</para>
<para>
<parameter>filename</parameter> is the name of the file to read. This
cannot be a URL.
</para>
<para>
<parameter>sections</parameter> is a comma separated list of sections that
need to be present in file to produce a result array. If none of the
requested sections could be found the return value is &false;.
<informaltable>
<tgroup cols="2">
<tbody>
<row>
<entry>FILE</entry>
<entry>FileName, FileSize, FileDateTime, SectionsFound</entry>
</row>
<row>
<entry>COMPUTED</entry>
<entry>html, Width, Height, IsColor and some more if available.
</entry>
</row>
<row>
<entry>ANY_TAG</entry>
<entry>Any information that has a Tag e.g. IFD0, EXIF, ...</entry>
</row>
<row>
<entry>IFD0</entry>
<entry>All tagged data of IFD0. In normal imagefiles this contains
image size and so forth.</entry>
</row>
<row>
<entry>THUMBNAIL</entry>
<entry>A file is supposed to contain a thumbnail if it has a second IFD.
All tagged information about the embedded thumbnail is stored in this
section.</entry>
</row>
<row>
<entry>COMMENT</entry>
<entry>Comment headers of JPEG images.</entry>
</row>
<row>
<entry>EXIF</entry>
<entry>The EXIF section is a sub section of IFD0. It contains
more detailed information about an image. Most of these entries
are digital camera related.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
<para>
<parameter>arrays</parameter> specifies whether or not each section
becomes an array. The sections <emphasis>COMPUTED</emphasis>,
<emphasis>THUMBNAIL</emphasis> and <emphasis>COMMENT</emphasis> always
become arrays as they may contain values whose names are conflict
with other sections.
</para>
<para>
<parameter>thumbnail</parameter> whether or not to read the thumbnail
itself and not only its tagged data.
</para>
<note>
<para>
Exif headers tend to be present in JPEG/TIFF 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.
</para>
<para>
Windows ME/XP both can wipe the Exif headers when connecting to a camera.
More information available at <ulink
url="&url.winexif;">&url.winexif;</ulink>.
</para>
</note>
<note>
<para>
If the image contains any IFD0 data then COMPUTED contains the entry
ByteOrderMotorola which is 0 for little-endian (intel) and 1 for
big-endian (motorola) byte order. This was added in PHP 4.3.0.
</para>
<para>
When an Exif header contains a Copyright note this itself can contain two
values. As the solution is inconsistent in the Exif 2.10 standard the COMPUTED
section will return both entries <emphasis>Copyright.Photographer</emphasis>
and <emphasis>Copyright.Editor</emphasis> while the IFD0 sections contains
the byte array with the NULL character that splits both entries. Or just the
first entry if the datatype was wrong (normal behaviour of Exif). The
COMPUTED will contain also an entry <emphasis>Copyright</emphasis> Which
is either the original copyright string or it is a comma separated list of
photo and editor copyright.
</para>
</note>
<note>
<para>
The tag UserComment has the same problem as the Copyright tag. It can store
two values first the encoding used and second the value itself. If so the
IFD section only contains the encoding or a byte array. The COMPUTED section
will store both in the entries <emphasis>UserCommentEncoding</emphasis> and
<emphasis>UserComment</emphasis>. The entry <emphasis>UserComment</emphasis>
is available in both cases so it should be used in preference to the value
in IFD0 section.
</para>
<para>
If the user comment uses Unicode or JIS encoding and the module mbstring is
available this encoding will automatically changed according to the exif
ini settings in the &php.ini;. This was added in PHP 4.3.0.
</para>
</note>
<note>
<para>
Height and Width are computed the same way <function>getimagesize</function>
does so their values must not be part of any header returned. Also html is
a height/width text string to be used inside normal <acronym>HTML</acronym>.
</para>
</note>
<note>
<para>
Starting from PHP 4.3.0, the function can read all embedded
<acronym>IFD</acronym> data including arrays (returned as such). Also
the size of an embedded thumbnail is returned in
<emphasis>THUMBNAIL</emphasis> subarray and the function
<function>exif_read_data</function> can return thumbnails in
<acronym>TIFF</acronym> format. Also as of PHP 4.3.0 there is no longer
a maximum length for returned values (not until memory limit is reached).
</para>
</note>
<simpara>
Since PHP 4.3,0 user comment can automatically change encoding if PHP was
compiled using <option role="configure">--enable-mbstring</option>.
</simpara>
</refsect1>
<refsect1>
&reftitle.returnvalues;
<para>
It returns an associative <type>array</type> where the array indexes are
the header names and the array values are the values associated with
those headers. If no data can be returned,
<function>exif_read_data</function> will return &false;.
</para>
</refsect1>
<refsect1>
&reftitle.examples;
<para>
<example>
<title><function>exif_read_data</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo "test1.jpg:<br />\n";
$exif = exif_read_data('tests/test1.jpg', 'IFD0');
echo $exif===false ? "No header data found.<br />\n" : "Image contains headers<br />";
$exif = exif_read_data('tests/test2.jpg', 0, true);
echo "test2.jpg:<br />\n";
foreach ($exif as $key => $section) {
foreach ($section as $name => $val) {
echo "$key.$name: $val<br />\n";
}
}
?>
]]>
</programlisting>
<para>
The first call fails because the image has no header information.
<screen role="php">
<![CDATA[
test1.jpg:
No header data found.
test2.jpg:
FILE.FileName: test2.jpg
FILE.FileDateTime: 1017666176
FILE.FileSize: 1240
FILE.FileType: 2
FILE.SectionsFound: ANY_TAG, IFD0, THUMBNAIL, COMMENT
COMPUTED.html: width="1" height="1"
COMPUTED.Height: 1
COMPUTED.Width: 1
COMPUTED.IsColor: 1
COMPUTED.ByteOrderMotorola: 1
COMPUTED.UserComment: Exif test image.
COMPUTED.UserCommentEncoding: ASCII
COMPUTED.Copyright: Photo (c) M.Boerger, Edited by M.Boerger.
COMPUTED.Copyright.Photographer: Photo (c) M.Boerger
COMPUTED.Copyright.Editor: Edited by M.Boerger.
IFD0.Copyright: Photo (c) M.Boerger
IFD0.UserComment: ASCII
THUMBNAIL.JPEGInterchangeFormat: 134
THUMBNAIL.JPEGInterchangeFormatLength: 523
COMMENT.0: Comment #1.
COMMENT.1: Comment #2.
COMMENT.2: Comment #3end
THUMBNAIL.JPEGInterchangeFormat: 134
THUMBNAIL.Thumbnail.Height: 1
THUMBNAIL.Thumbnail.Height: 1
]]>
</screen>
</para>
</example>
</para>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<function>exif_thumbnail</function>&listendand;
<function>getimagesize</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/exif/functions/exif-tagname.xml?r=1.1&p=1
Index: phpdoc/en/reference/exif/functions/exif-tagname.xml
+++ phpdoc/en/reference/exif/functions/exif-tagname.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.exif-tagname">
<refnamediv>
<refname>exif_tagname</refname>
<refpurpose>Get the header name for an index</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>exif_tagname</methodname>
<methodparam><type>string</type><parameter>index</parameter></methodparam>
</methodsynopsis>
&warn.undocumented.func;
</refsect1>
<refsect1>
&reftitle.returnvalues;
<para>
Returns &false; if <parameter>index</parameter> is undefined otherwise
the header name is returned.
</para>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<function>exif_imagetype</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/exif/functions/exif-thumbnail.xml?r=1.1&p=1
Index: phpdoc/en/reference/exif/functions/exif-thumbnail.xml
+++ phpdoc/en/reference/exif/functions/exif-thumbnail.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.78 -->
<refentry id="function.exif-thumbnail">
<refnamediv>
<refname>exif_thumbnail</refname>
<refpurpose>Retrieve the embedded thumbnail of a TIFF or JPEG image</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>exif_thumbnail</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>&width</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>&height</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>&imagetype</parameter></methodparam>
</methodsynopsis>
<para>
<function>exif_thumbnail</function> reads the embedded thumbnail of a
<acronym>TIFF</acronym> or <acronym>JPEG</acronym> image.
</para>
<para>
If you want to deliver thumbnails through this function, you should send
the mimetype information using the <function>header</function> function.
</para>
<para>
The parameters <parameter>width</parameter>,
<parameter>height</parameter> and <parameter>imagetype</parameter> are
available since PHP 4.3.0 and return the size of the thumbnail as well
as its type. It is possible that <function>exif_thumbnail</function>
cannot create an image but can determine its size. In this case, the
return value is &false; but <parameter>width</parameter> and
<parameter>height</parameter> are set.
</para>
<para>
Starting from version PHP 4.3.0, the function
<function>exif_thumbnail</function> can return thumbnails in
<acronym>TIFF</acronym> format.
</para>
</refsect1>
<refsect1>
&reftitle.returnvalues;
<para>
If the image contains no thumbnail, &false; will be returned. Otherwise
the embedded thumbnail is returned.
</para>
</refsect1>
<refsect1>
&reftitle.examples;
<para>
<example>
<title><function>exif_thumbnail</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
if (array_key_exists('file', $_REQUEST)) {
$image = exif_thumbnail($_REQUEST['file'], $width, $height, $type);
} else {
$image = false;
}
if ($image!==false) {
header("Content-type: " .image_type_to_mime_type($type));
echo $image;
exit;
} else {
// no thumbnail available, handle the error here
echo "No thumbnail available";
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<function>exif_read_data</function>&listendand;
<function>image_type_to_mime_type</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/exif/functions/read-exif-data.xml?r=1.1&p=1
Index: phpdoc/en/reference/exif/functions/read-exif-data.xml
+++ phpdoc/en/reference/exif/functions/read-exif-data.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.78 -->
<refentry id="function.read-exif-data">
<refnamediv>
<refname>read_exif_data</refname>
<refpurpose>Alias of <function>exif_read_data</function></refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
This function is an alias of <function>exif_read_data</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->