Re: cvs: php4 /ext/exif exif.c

From: Date: Sat, 22 Jun 2002 18:53:12 +0000
Subject: Re: cvs: php4 /ext/exif exif.c
References: 1  Groups: php.cvs php.dev 
Request: Send a blank email to php-dev+get-85494@lists.php.net to get a copy of this message
At 20:38 22.06.2002, Marcus Börger wrote:
helly           Sat Jun 22 14:38:34 2002 EDT
Modified files:
    /php4/ext/exif      exif.c
Log: @exif_read_data returns mime-type now for image and thumbnail And exif_thumbnail now optionally returns imagetype. (Marcus) #So now you can use imagetype2filetype with exif_thumbnail Index: php4/ext/exif/exif.c diff -u php4/ext/exif/exif.c:1.92 php4/ext/exif/exif.c:1.93
(...) This allows the following script: <?php // expect $imagefile contains path&filename for an image.
$width     = 0;
$height    = 0;
$image_type= 0; $thumbnail = @exif_thumbnail($imagefile, $width, $height, $image_type); if ($thumbnail===false) {
        // generate and catch or get cached thumbnail
        // return cached thumbnail
        exit;
} else {
        // Return content-type of thumbnail
        @Header("content-type: ".imagetype2mimetype($image_type));
        // and thumbnail itself
        echo($thumbnail);
        exit;
} ?> Question: if i use $width=$height=$image_type=0; then all three receive the value of $image_type. Where is the failure?

« previous php.dev (#85494) next »