note 21291 added to function.exif-thumbnail

From: Date: Tue, 07 May 2002 02:13:27 +0000
Subject: note 21291 added to function.exif-thumbnail
Groups: php.notes 
Request: Send a blank email to php-notes+get-30282@lists.php.net to get a copy of this message
The embedded thumbnail can be stored for later use using fopen and such commands. However, I like the idea of extracting the thumbnails because they already are in the files. Use the following (VERY) basic script to extract the EXIF_thumbnail from a picture in, say, a gallery. It assumes that: 1 - The script is one directory above the directory with the images 2 - That the images even HAVE EXIF thumbnail Just call upong the script like this: <IMG ALT="Thumbnail" SRC="./images/thumbnail.php?gallery=family&file=vacation01.jpg"> (the IMG tag will recognize the .php file as a valid JPG and it will display it like it would display any JPG file.) ===== <?php $img_stream = exif_thumbnail("./" . $gallery . "/" . $file); echo("$img_stream"); ?> ===== -- http://www.php.net/manual/en/function.exif-thumbnail.php http://master.php.net/manage/user-notes.php?action=edit+21291 http://master.php.net/manage/user-notes.php?action=delete+21291 http://master.php.net/manage/user-notes.php?action=reject+21291

« previous php.notes (#30282) next »