#17263 [Bgs]: imagecopyresized
| From: | nicolaasuni at tiscali dot it | Date: | Thu, 12 Sep 2002 08:52:15 +0000 |
| Subject: | #17263 [Bgs]: imagecopyresized | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-19216@lists.php.net to get a copy of this message | ||
ID: 17263
User updated by: nicolaasuni@tiscali.it
Reported By: nicolaasuni@tiscali.it
Status: Bogus
Bug Type: GD related
-Operating System: Windows XP Pro
+Operating System: Windows XP Pro or Linux
-PHP Version: 4.2.0
+PHP Version: 4.2.2
New Comment:
The problem persist using the current PHP version 4.2.2
Previous Comments:
------------------------------------------------------------------------
[2002-09-11 11:08:13] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
------------------------------------------------------------------------
[2002-07-02 21:56:55] sniper@php.net
Please try this snapshot:
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
[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