|
Home
iRate! IceMelon IM Tutorials Headlines CoolSites PHP Functions |
Most Referenced Functions » google_pagerank() » preg_replace() » imagecreatefrompng() » site_pageranks() » imagepng() » imagedestroy() » imagestring() » imagecolorallocate() » htmlentities() » fopen() » preg_match() » header() » getimagesize() » htmlspecialchars() » ob_start() » session_start() » strstr() » ob_flush() » preg_match_all() » strpos() » flush() » setcookie() » str_replace() » array2vars() » nl2br() » preg_split() » ereg() » urlencode() » ereg_replace() » readgzfile() Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m. |
PHP Functions
Function: exif_thumbnail (PHP 4 >= 4.2.0, PHP 5) exif_thumbnail -- Retrieve the embedded thumbnail of a TIFF or JPEG imageDescriptionstring exif_thumbnail ( string filename [, 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. 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. Parameters
filename The name of the image file being read. This image contains an embedded thumbnail. widthThe return width of the returned thumbnail. heightThe returned height of the returned thumbnail. imagetypeThe returned image type of the returned thumbnail. This is either TIFF or JPEG . Return ValuesReturns the embedded thumbnail, or FALSE if the image contains no thumbnail. 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.
Examples
Example 1. exif_thumbnail() example <?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'; } ?> Related Function(s) |