#17263 [Fbk->Bgs]: imagecopyresized
| From: | sniper@php.net | Date: | Wed, 11 Sep 2002 16:08:13 +0000 |
| Subject: | #17263 [Fbk->Bgs]: imagecopyresized | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-19089@lists.php.net to get a copy of this message | ||
ID: 17263
Updated by: sniper@php.net
Reported By: nicolaasuni@tiscali.it
-Status: Feedback
+Status: Bogus
Bug Type: GD related
Operating System: Windows XP Pro
PHP Version: 4.2.0
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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