note 42702 rejected from function.exif-thumbnail by nlopess

From: Date: Wed, 26 May 2004 18:56:50 +0000
Subject: note 42702 rejected from function.exif-thumbnail by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-70136@lists.php.net to get a copy of this message
Note Submitter: itch74@hotmail.com ---- While this function works its practical use seems limited. Using php 4.3.4 and the latest apache 2.0 build (5/04) the thumbnail of an image will not be displayed correctly unless some unknown circumstance exists. For example: if you use the script: <?php $image = exif_thumbnail('griffon1.jpg'); header("Content-type: image/jpeg"); echo $image; ?> This will work however, if you use this following script: <?php // test ?> <?php $image = exif_thumbnail('griffon1.jpg'); header("Content-type: image/jpeg"); echo $image; ?> You will receive this error: Warning: Cannot modify header information - headers already sent by (output started at C:\apache\Apache2\htdocs\index2.php:5) in C:\apache\Apache2\htdocs\index2.php on line 7 followed by raw image data, not the image itself. Does anyone know a work around to this? I have also tried usign ob_start and ob_flush at the beginning and ending of the page.. .this will remove the warning, but you will not see the image, only the raw image data.

« previous php.notes (#70136) next »