|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-05-01 16:40 UTC] aaron_hawryluk at shaw dot ca
[2003-05-01 17:45 UTC] philip@php.net
[2003-05-09 10:16 UTC] aaron_hawryluk at shaw dot ca
[2003-05-09 10:22 UTC] goba@php.net
[2003-05-09 16:56 UTC] philip@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 09 00:00:01 2026 UTC |
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); ?>