note 20706 deleted from function.imagecopyresized by alindeman

From: Date: Sat, 13 Apr 2002 16:13:52 +0000
Subject: note 20706 deleted from function.imagecopyresized by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-29198@lists.php.net to get a copy of this message
I doesn't work at all: <?php header("Content-type: image/jpeg"); $src_img=ImageCreateFromJpeg("file.gif"); $new_w=round(ImageSX($src_img)/100)*15; $new_h=round(ImageSY($src_img)/100)*15; $dst_img=ImageCreate($new_w,$new_h); ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w,$new_h, ImageSX($src_img), ImageSY($src_img)); ImageJpeg($dst_img); ?> ...but if you are trying to work with GIF, it is working properly without any problems: <?php header("Content-type: image/gif"); $src_img=ImageCreateFromGif("file.gif"); $new_w=round(ImageSX($src_img)/100)*15; $new_h=round(ImageSY($src_img)/100)*15; $dst_img=ImageCreate($new_w,$new_h); ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w,$new_h, ImageSX($src_img), ImageSY($src_img)); ImageGif($dst_img); ?>

« previous php.notes (#29198) next »