diff --git a/reference/exif/functions/exif-imagetype.xml b/reference/exif/functions/exif-imagetype.xml index f101e5c6e0..6528c99945 100644 --- a/reference/exif/functions/exif-imagetype.xml +++ b/reference/exif/functions/exif-imagetype.xml @@ -1,5 +1,5 @@ - + @@ -10,31 +10,76 @@ &reftitle.description; intexif_imagetype - stringfilename + stringfilename exif_imagetype reads the first bytes of an image and checks its signature. - - - Support for JPC, JP2, - JPX, JB2, - XBM, and WBMP became available in - PHP 4.3.2. Support for SWC as of PHP 4.3.0. - - - This function can be used to avoid calls to other exif functions with - unsupported file types or in conjunction with - $_SERVER['HTTP_ACCEPT'] to check whether or - not the viewer is able to see a specific image in the browser. + exif_imagetype can be used to avoid calls to other + exif functions with unsupported file types + or in conjunction with $_SERVER['HTTP_ACCEPT'] to check + whether or not the viewer is able to see a specific image in the browser. + + + + &reftitle.parameters; + + + + filename + + + The image being checked. + + + + + + + + &reftitle.returnvalues; + + 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 getimagesize returns in index 2 but + exif_imagetype is much faster. + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.3.2 + + Support for JPC, JP2, + JPX, JB2, + XBM, and WBMP + + + + 4.3.0 + Support for SWC + + + + &reftitle.constants; - The following constants are defined and represent possible + The following constants are defined, and represent possible exif_imagetype return values: Imagetype Constants @@ -117,15 +162,6 @@
- - &reftitle.returnvalues; - - 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 getimagesize returns in index 2 but - this function is much faster. - - &reftitle.examples; @@ -134,8 +170,8 @@ ]]> @@ -170,4 +206,4 @@ End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file diff --git a/reference/exif/functions/exif-read-data.xml b/reference/exif/functions/exif-read-data.xml index 92f2323a8d..5037869208 100644 --- a/reference/exif/functions/exif-read-data.xml +++ b/reference/exif/functions/exif-read-data.xml @@ -1,177 +1,231 @@ - + - - - exif_read_data - Reads the EXIF headers from JPEG - or TIFF - - - &reftitle.description; - - arrayexif_read_data - stringfilename - stringsections - boolarrays - boolthumbnail - - - The exif_read_data function reads the - EXIF headers from a JPEG or - TIFF image file. This way you can read meta data - generated by digital cameras. - - - filename is the name of the file to read. This - cannot be a URL. - - - sections 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;. - - - - - FILE - FileName, FileSize, FileDateTime, SectionsFound - - - COMPUTED - html, Width, Height, IsColor and some more if available. - - - - ANY_TAG - Any information that has a Tag e.g. IFD0, EXIF, ... - - - IFD0 - All tagged data of IFD0. In normal imagefiles this contains - image size and so forth. - - - THUMBNAIL - 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. - - - COMMENT - Comment headers of JPEG images. - - - EXIF - 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. - - - - - - - arrays specifies whether or not each section - becomes an array. The sections COMPUTED, - THUMBNAIL and COMMENT always - become arrays as they may contain values whose names are conflict - with other sections. - - - thumbnail whether or not to read the thumbnail - itself and not only its tagged data. - - - - 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. - - - Windows ME/XP both can wipe the Exif headers when connecting to a camera. - More information available at &url.winexif;. - - - - - 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. - - - 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 Copyright.Photographer - and Copyright.Editor 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 Copyright Which - is either the original copyright string or it is a comma separated list of - photo and editor copyright. - - - - - 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 UserCommentEncoding and - UserComment. The entry UserComment - is available in both cases so it should be used in preference to the value - in IFD0 section. - - - 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. - - - - - Height and Width are computed the same way getimagesize - 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 HTML. - - - - - Starting from PHP 4.3.0, the function can read all embedded - IFD data including arrays (returned as such). Also - the size of an embedded thumbnail is returned in - THUMBNAIL subarray and the function - exif_read_data can return thumbnails in - TIFF format. Also as of PHP 4.3.0 there is no longer - a maximum length for returned values (not until memory limit is reached). - - - - Since PHP 4.3,0 user comment can automatically change encoding if PHP was - compiled using . - - - - &reftitle.returnvalues; - - It returns an associative array 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, - exif_read_data will return &false;. - - - - &reftitle.examples; - - - <function>exif_read_data</function> example - + + + exif_read_data + Reads the EXIF headers from JPEG or TIFF + + + &reftitle.description; + + arrayexif_read_data + stringfilename + stringsections + boolarrays + boolthumbnail + + + The exif_read_data function reads the + EXIF headers from a JPEG or + TIFF image file. This way you can read meta data + generated by digital cameras. + + + 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. + + + Height and Width are computed the + same way getimagesize 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 HTML. + + + 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 Copyright.Photographer + and Copyright.Editor 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 also contain the entry Copyright which + is either the original copyright string, or a comma separated list of the + photo and editor copyright. + + + 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 UserCommentEncoding and + UserComment. The entry UserComment + is available in both cases so it should be used in preference to the value + in IFD0 section. + + + + Windows ME/XP can both wipe the Exif headers when connecting to a camera. + More information available at &url.winexif;. + + + + + &reftitle.parameters; + + + + filename + + + The name of the image file being read. This cannot be an + URL. + + + + + sections + + + 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;. + + + + + FILE + FileName, FileSize, FileDateTime, SectionsFound + + + COMPUTED + + html, Width, Height, IsColor, and more if available. Height and + Width are computed the same way getimagesize + 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 + HTML. + + + + ANY_TAG + Any information that has a Tag e.g. IFD0, EXIF, ... + + + IFD0 + + All tagged data of IFD0. In normal imagefiles this contains + image size and so forth. + + + + THUMBNAIL + + 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. + + + + COMMENT + Comment headers of JPEG images. + + + EXIF + + 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. + + + + + + + + + + arrays + + + Specifies whether or not each section becomes an array. The + sections COMPUTED, + THUMBNAIL, and COMMENT + always become arrays as they may contain values whose names conflict + with other sections. + + + + + thumbnail + + + When set to &true; the thumbnail itself is read. Otherwise, only the + tagged data is read. + + + + + + + + &reftitle.returnvalues; + + It returns an associative array 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, + exif_read_data will return &false;. + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.3.0 + + Can read all embedded IFD data including arrays + (returned as such). Also the size of an embedded thumbnail is + returned in a THUMBNAIL subarray, and can + return thumbnails in TIFF format. Also, there is + no longer a maximum length for returned values (not until the memory + limit has been reached) + + + + 4.3.0 + + If PHP has mbstring support, + the user comment can automatically change encoding. Also, if the + user comment uses Unicode or JIS encoding this encoding will + automatically be changed according to the exif ini settings in + &php.ini; + + + + 4.3.0 + + 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. Also, COMPUTED and UserComment no + longer only contain the first copyright entry if the datatype was + wrong. + + + + + + + + + &reftitle.examples; + + + <function>exif_read_data</function> example + \n"; $exif = exif_read_data('tests/test1.jpg', 'IFD0'); -echo $exif===false ? "No header data found.
\n" : "Image contains headers
"; +echo $exif===false ? "No header data found.
\n" : "Image contains headers
\n"; $exif = exif_read_data('tests/test2.jpg', 0, true); echo "test2.jpg:
\n"; @@ -182,11 +236,11 @@ foreach ($exif as $key => $section) { } ?> ]]> -
- - The first call fails because the image has no header information. - - +
+ + The first call fails because the image has no header information. + + - -
-
-
- - &reftitle.seealso; - - exif_thumbnail&listendand; - getimagesize. - - -
+ + +
+
+ + &reftitle.seealso; + + exif_thumbnail&listendand; + getimagesize + + +
- - - exif_tagname - Get the header name for an index - - - &reftitle.description; - - stringexif_tagname stringindex - + + + + exif_tagname + Get the header name for an index + + + &reftitle.description; + + stringexif_tagname + stringindex + - &warn.undocumented.func; + &warn.undocumented.func; - - - &reftitle.returnvalues; - - Returns &false; if index is undefined otherwise - the header name is returned. - - - - &reftitle.seealso; - - exif_imagetype. - - - + + + &reftitle.parameters; + + + + index + + + The image index + + + + + + + + &reftitle.returnvalues; + + Returns the header name, or &false; if index is + undefined. + + + + &reftitle.seealso; + + exif_imagetype + + + + - - - exif_thumbnail - Retrieve the embedded thumbnail of a TIFF or JPEG image - - - &reftitle.description; - - stringexif_thumbnail - stringfilename - int&width - int&height - int&imagetype - - - exif_thumbnail reads the embedded thumbnail of a - TIFF or JPEG image. - - - If you want to deliver thumbnails through this function, you should send - the mimetype information using the header function. - - - The parameters width, - height and imagetype are - available since PHP 4.3.0 and return the size of the thumbnail as well - as its type. It is possible that exif_thumbnail - cannot create an image but can determine its size. In this case, the - return value is &false; but width and - height are set. - - - Starting from version PHP 4.3.0, the function - exif_thumbnail can return thumbnails in - TIFF format. - - - - &reftitle.returnvalues; - - If the image contains no thumbnail, &false; will be returned. Otherwise - the embedded thumbnail is returned. - - - - &reftitle.examples; - - - <function>exif_thumbnail</function> example - + + + exif_thumbnail + Retrieve the embedded thumbnail of a TIFF or JPEG image + + + &reftitle.description; + + stringexif_thumbnail + stringfilename + intwidth + intheight + intimagetype + + + exif_thumbnail reads the embedded thumbnail of a + TIFF or JPEG image. + + + If you want to deliver thumbnails through this function, you should send + the mimetype information using the header function. + + + It is possible that exif_thumbnail cannot create an + image but can determine its size. In this case, the return value is + &false; but width and height + are set. + + + + &reftitle.parameters; + + + + filename + + + The name of the image file being read. This image contains an + embedded thumbnail. + + + + + width + + + The return width of the returned thumbnail. + + + + + height + + + The returned height of the returned thumbnail. + + + + + imagetype + + + The returned image type of the returned thumbnail. This is either + TIFF or JPEG. + + + + + + + + &reftitle.returnvalues; + + Returns the embedded thumbnail, or &false; if the image contains no + thumbnail. + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.3.0 + + The optional parameters width, + height, and imagetype + all became available. + + + + 4.3.0 + + May return thumbnails in the TIFF format. + + + + + + + + + &reftitle.examples; + + + <function>exif_thumbnail</function> example + ]]> - - - - - - &reftitle.seealso; - - exif_read_data&listendand; - image_type_to_mime_type. - - - + + + + + + &reftitle.seealso; + + exif_read_data&listendand; + image_type_to_mime_type + + + +--> \ No newline at end of file diff --git a/reference/exif/functions/read-exif-data.xml b/reference/exif/functions/read-exif-data.xml index 4c9cc0008b..5343ec81cd 100644 --- a/reference/exif/functions/read-exif-data.xml +++ b/reference/exif/functions/read-exif-data.xml @@ -1,18 +1,18 @@ - + - - - read_exif_data - Alias of exif_read_data - - - Description - - This function is an alias of exif_read_data. - - - + + + read_exif_data + Alias of exif_read_data + + + &reftitle.description; + + This function is an alias of exif_read_data. + + +