#23444 [NEW]: [chm] bug on function.imagecopyresampled.html
| From: | aaron_hawryluk at shaw dot ca | Date: | Thu, 01 May 2003 21:22:16 +0000 |
| Subject: | #23444 [NEW]: [chm] bug on function.imagecopyresampled.html | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969352999@lists.php.net to get a copy of this message | ||
From: aaron_hawryluk at shaw dot ca
Operating system: windows 2000
PHP version: 4.3.1
PHP Bug Type: Documentation problem
Bug description: [chm] bug on function.imagecopyresampled.html
I have found a bug on page function.imagecopyresampled.html
[chm date: 2002-12-27]...
imagecopyresampled does not appear to apply to the Win32 version of PHP
4.3.1 running the included php_gd.dll (zip version download from php.net).
The function is undefined and causes fatal errors when called.
This works:
<?php
header("Content-type: image/jpeg");
$im = imagecreate (150, 30); /* Create a blank image */
$bgc = imagecolorallocate ($im, 255, 255, 255);
$tc = imagecolorallocate ($im, 0, 0, 0);
imagefilledrectangle ($im, 5, 5, 145, 25, $bgc);
imagestring ($im, 1, 5, 5, "This is an image.", $tc);
$aspect = 150/30;
$naspect = 1/$aspect;
$destimg = imagecreate(300,100);
imagecopyresized($destimg,$im,0,0,0,0,300,100,150,30);
imagejpeg($destimg);
?>
This does not:
<?php
header("Content-type: image/jpeg");
$im = imagecreate (150, 30); /* Create a blank image */
$bgc = imagecolorallocate ($im, 255, 255, 255);
$tc = imagecolorallocate ($im, 0, 0, 0);
imagefilledrectangle ($im, 5, 5, 145, 25, $bgc);
imagestring ($im, 1, 5, 5, "This is an image.", $tc);
$aspect = 150/30;
$naspect = 1/$aspect;
$destimg = imagecreate(300,100);
imagecopyresampled($destimg,$im,0,0,0,0,300,100,150,30);
imagejpeg($destimg);
?>
--
Edit bug report at http://bugs.php.net/?id=23444&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23444&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23444&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23444&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23444&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23444&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23444&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23444&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23444&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23444&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23444&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23444&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23444&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23444&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23444&r=gnused