Bug #17263 Updated: imagecopyresized

From: Date: Wed, 03 Jul 2002 01:56:55 +0000
Subject: Bug #17263 Updated: imagecopyresized
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12910@lists.php.net to get a copy of this message
ID: 17263 Updated by: sniper@php.net Reported By: nicolaasuni@tiscali.it -Status: Open +Status: Feedback Bug Type: GD related Operating System: Windows XP Pro PHP Version: 4.2.0 New Comment: Please try this snapshot: http://snaps.php.net/win32/php4-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2002-06-28 06:02:26] nicolaasuni@tiscali.it This is an examle script that produce the error explained in my previous message. For this test I've used a 1x50 pixel PNG image with 50 different paletted colours. <?php $src_img_file_name = "source_image.png"; // filename of source file $dest_img_width = 150; // destination image width $dest_img_height = 50; // destination image height $src_img_width = 1; // source image width $src_img_height = 50; // source image height // create a blank image $dest_img = @ImageCreate($dest_img_width, $dest_img_height) or die ("Cannot Initialize new GD image stream"); // create image from source image file $src_img = imagecreatefrompng($src_img_file_name); // copy source image to destination image resampled imagecopyresampled($dest_img, $src_img, 0, 0, 0, 0, $dest_img_width, $dest_img_height, $src_img_width, $src_img_height); // copy source image to destination image resized //imagecopyresized($dest_img, $src_img, 0, 0, 0, 0, $dest_img_width, $dest_img_height, $src_img_width, $src_img_height); //send image to output header("Content-type: image/png"); ImagePng($dest_img); ?> ------------------------------------------------------------------------ [2002-06-28 03:02:30] sniper@php.net Please add a short example script here which can be used to reproduce this. ------------------------------------------------------------------------ [2002-05-15 18:21:50] nicolaasuni@tiscali.it Using php_gd2.dll and paletted image the method imagecopyresized return a monochromatic rectangle and the method imagecopyresampled return a blank rectangle. These methods works fine only with true color images. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17263&edit=1

« previous php.bugs (#12910) next »