|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-11-02 06:39 UTC] surfchen at gmail dot com
Description:
------------
1)the imagegif,imagejpg,imagepng can not be used with tow parameters which the 2nd parameter is ''(null).but if give the function more than 2 parameters,it works.
2)imagegif can give 4 parameters while the document just says it just have tow parameters.
Reproduce code:
---------------
<?php//incorrect.1)
$img=imagecreatefromgif('2.gif');
header("Content-type:image/gif");
imagegif($img,'');
?>
<?php//correct(with 4 parameters).2)
$img=imagecreatefromgif('2.gif');
header("Content-type:image/gif");
imagegif($img,'',55,22);
?>
Expected result:
----------------
1) should ouput correct.
2) should ouput a error because that it have 4 parameters
Actual result:
--------------
1)output a incorrect image
2)ouput correctly
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 18:00:02 2025 UTC |
1) I must write more code when I can't sure a filename(2nd parameter) will be a empty string or a normal string. if ($filename=='') { imagegif($img); } else { imagegif($img,$filename); } 2)why the imagegif have 4 parameters while imagepng,imagejpg have 3?