From:             ernesto at music dot lv
Operating system: Linux or Windows, Apache
PHP version:      4.3.3
PHP Bug Type:     Reproducible crash
Bug description:  imagecopymergegray craches apache

Description:
------------
when using imagecopymergegray with pct value of 100, everything is fine,
i.e., imagecopymergegray works exactly as imagecopy. but, when setting pct
value to 99 or less, apache crashes.

Reproduce code:
---------------
$pic1 = imagecreatefromjpeg("my.jpg"); // 100x100px
$pic2 = imagecreatetruecolor(100, 100);

imacecopy($pic2, $pic1, 0, 0, 0, 0, 100, 100);
imagecopymergegray($pic2, $pic1, 0, 0, 0, 0, 100, 100, 50);

imagejpeg($pic2,"my2.jpg");
imagedestroy($pic2);


Expected result:
----------------
my2.jpg - slightly saturated version of my.jpg.

Actual result:
--------------
a crash.

-- 
Edit bug report at http://bugs.php.net/?id=25476&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25476&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25476&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25476&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25476&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25476&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25476&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25476&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25476&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25476&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25476&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25476&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25476&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25476&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25476&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25476&r=gnused

Reply via email to