ID:               30595
 Updated by:       [EMAIL PROTECTED]
 Reported By:      lunter at interia dot pl
-Status:           Open
+Status:           Bogus
 Bug Type:         GD related
 Operating System: WinXP SP2
 PHP Version:      5.0.2
-Assigned To:      
+Assigned To:      pajoye
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

imagecopyresampled uses a resampling using weight of each original
pixels in the destination image. That means even by resizing by a ratio
of 0.99, you will have part of the image that will differ, in your case
the edges of your square.

--Pierre


Previous Comments:
------------------------------------------------------------------------

[2004-10-28 11:02:46] lunter at interia dot pl

Description:
------------
Imagecopyresampled function bug:

Original image: Any one-color square.
After resized (reduce 1 pixel width and heihgt): Two colors square with
noise !!!

Example with PHP code:
http://www.pc44.pl/goorol/ImagecopyresampledBug.zip

Reproduce code:
---------------
<?
 $im=imagecreatefrompng('original.png'); // 100x100 one-color square
 $re=imagecreatetruecolor(99,99); 
 imagecopyresampled($re,$im,0,0,0,0,99,99,imagesx($im),imagesy($im));
 imagepng($re,'resized.png');
?>

http://www.pc44.pl/goorol/ImagecopyresampledBug.zip

Expected result:
----------------
One-color 99x99 square.

Actual result:
--------------
Two-colors with NOISE 99x99 square.

Example with PHP code:
http://www.pc44.pl/goorol/ImagecopyresampledBug.zip


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30595&edit=1

Reply via email to