questo file mi ridimensiona le immagini jpg...ma non i gif...

Codice PHP:
<?php
$height
100;
$width100;
// Content type
header('Content-type: image/jpeg');
if(!
$filename)
$filename="./images/nopic.jpg";
// Get new dimensions
list($width_orig$height_orig) = getimagesize($filename);

if (
$width && ($width_orig $height_orig)) {
   
$width = ($height $height_orig) * $width_orig;
} else {
   
$height = ($width $width_orig) * $height_orig;
}

// Resample
$image_p imagecreatetruecolor($width$height);
$image imagecreatefromjpeg($filename);
imagecopyresampled($image_p$image0000$width$height$width_orig$height_orig);

// Output
imagejpeg($image_pnull100);
ImageDestroy ($image_p);
?>
ho provato mettendo:

header('Content-type: image/jpeg, image/gif, image/png, image/jpg.');

ma non va...qualcuno può aiutarmi??
grazie