mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
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. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@164307 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e641879bd3
commit
d5c708634f
10 changed files with 548 additions and 313 deletions
38
reference/exif/configure.xml
Normal file
38
reference/exif/configure.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?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
|
||||
-->
|
45
reference/exif/constants.xml
Normal file
45
reference/exif/constants.xml
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?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
|
||||
-->
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- splitted from ./en/functions/image.xml, last change in rev 1.81 -->
|
||||
<refentry id="function.exif-imagetype">
|
||||
<refnamediv>
|
||||
|
@ -7,20 +7,35 @@
|
|||
<refpurpose>Determine the type of an image</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>exif_imagetype</methodname>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
&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. When a correct signature is found a constant 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.
|
||||
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>
|
||||
The following constants are defined:
|
||||
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">
|
||||
|
@ -101,48 +116,38 @@
|
|||
</tgroup>
|
||||
</table>
|
||||
</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>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
&reftitle.returnvalues;
|
||||
<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.
|
||||
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>
|
||||
<note>
|
||||
<simpara>
|
||||
This function is only available if PHP is compiled using
|
||||
<option role="configure">--enable-exif</option>.
|
||||
</simpara>
|
||||
</note>
|
||||
<note>
|
||||
<simpara>
|
||||
This function does not require the GD image library.
|
||||
</simpara>
|
||||
</note>
|
||||
<example>
|
||||
<title><function>exif_imagetype</function> example</title>
|
||||
<programlisting role="php">
|
||||
</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>
|
||||
<simpara>
|
||||
See also <function>getimagesize</function>.
|
||||
</simpara>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<function>getimagesize</function>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
@ -1,15 +1,14 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.19 $ -->
|
||||
<!-- $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>. This way you can read meta data generated by digital
|
||||
cameras.</refpurpose>
|
||||
or <acronym>TIFF</acronym></refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>exif_read_data</methodname>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
|
@ -19,10 +18,9 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>exif_read_data</function> function reads the
|
||||
EXIF headers from a JPEG or TIFF image file. It returns an associative
|
||||
array where the indexes are the header names and the values
|
||||
are the values associated with those headers. If no data can be returned
|
||||
the result is &false;.
|
||||
<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
|
||||
|
@ -76,7 +74,7 @@
|
|||
<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> allways
|
||||
<emphasis>THUMBNAIL</emphasis> and <emphasis>COMMENT</emphasis> always
|
||||
become arrays as they may contain values whose names are conflict
|
||||
with other sections.
|
||||
</para>
|
||||
|
@ -97,13 +95,80 @@
|
|||
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 />";
|
||||
|
@ -155,75 +220,13 @@ THUMBNAIL.Thumbnail.Height: 1
|
|||
</para>
|
||||
</example>
|
||||
</para>
|
||||
<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.
|
||||
</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.
|
||||
</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 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. Last but not least there is no longer a maximum length for returned
|
||||
values (not until memory limit is reached).
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<simpara>
|
||||
This function is only available in PHP 4 compiled using
|
||||
<option role="configure">--enable-exif</option>.
|
||||
Its functionality and behaviour has changed in PHP 4.2. Earlier versions
|
||||
are very unstable.
|
||||
</simpara>
|
||||
<simpara>
|
||||
Since PHP 4.3 user comment can automatically change encoding if PHP 4 was
|
||||
compiled using <option role="configure">--enable-mbstring</option>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function does not require the GD image library.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>exif_thumbnail</function> and <function>getimagesize</function>.
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<function>exif_thumbnail</function>&listendand;
|
||||
<function>getimagesize</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
@ -246,4 +249,4 @@ End:
|
|||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
-->
|
51
reference/exif/functions/exif-tagname.xml
Normal file
51
reference/exif/functions/exif-tagname.xml
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?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
|
||||
-->
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- splitted from ./en/functions/image.xml, last change in rev 1.78 -->
|
||||
<refentry id="function.exif-thumbnail">
|
||||
<refnamediv>
|
||||
|
@ -7,18 +7,21 @@
|
|||
<refpurpose>Retrieve the embedded thumbnail of a TIFF or JPEG image</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<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>
|
||||
&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 TIFF or JPEG image. If the image contains no thumbnail &false;
|
||||
will be returned.
|
||||
<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>,
|
||||
|
@ -30,10 +33,20 @@
|
|||
<parameter>height</parameter> are set.
|
||||
</para>
|
||||
<para>
|
||||
If you want to deliver thumbnails through this function, you should send
|
||||
the mimetype information using the <function>header</function> function.
|
||||
The following example demonstrates this:
|
||||
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>
|
||||
|
@ -58,27 +71,13 @@ if ($image!==false) {
|
|||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
Starting from version PHP 4.3.0, the function
|
||||
<function>exif_thumbnail</function> can return thumbnails in
|
||||
<acronym>TIFF</acronym> format.
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
This function is only available in PHP 4 compiled using
|
||||
<option role="configure">--enable-exif</option>.
|
||||
Its functionality and behaviour has changed in PHP 4.2.0
|
||||
</simpara>
|
||||
</note>
|
||||
<note>
|
||||
<simpara>
|
||||
This function does not require the GD image library.
|
||||
</simpara>
|
||||
</note>
|
||||
<simpara>
|
||||
See also <function>exif_read_data</function> and
|
||||
<function>exif_read_data</function>&listendand;
|
||||
<function>image_type_to_mime_type</function>.
|
||||
</simpara>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- splitted from ./en/functions/image.xml, last change in rev 1.78 -->
|
||||
<refentry id="function.read-exif-data">
|
||||
<refnamediv>
|
181
reference/exif/ini.xml
Normal file
181
reference/exif/ini.xml
Normal file
|
@ -0,0 +1,181 @@
|
|||
<?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
|
||||
-->
|
63
reference/exif/reference.xml
Normal file
63
reference/exif/reference.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?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
|
||||
-->
|
|
@ -1,164 +1,14 @@
|
|||
<?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:
|
||||
mode: sgml
|
||||
|
|
Loading…
Reference in a new issue