ID: 22756 Updated by: [EMAIL PROTECTED] Reported By: boy at 7935 dot com -Status: Feedback +Status: Bogus Bug Type: GD related Operating System: WIN2000 PHP Version: 4.3.1 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. . Previous Comments: ------------------------------------------------------------------------ [2003-03-19 20:17:59] freish at 55it dot com thank you, I solved this problem with imagecreatetruecolor() with your help. I need take more time to read the manuals before I submit a bug report, I think. ------------------------------------------------------------------------ [2003-03-19 11:52:25] [EMAIL PROTECTED] The demonstration link you provided does not work (Indeed I get not so much as a ping response from that host). Judging from your script my guess is that it's a palette issue which can be solved by using imagecreatetruecolor() rather than imagecreate(). ------------------------------------------------------------------------ [2003-03-17 21:42:48] boy at 7935 dot com I write a script to genreate rand string and image it with imagejpeg, the picture(0.jpg-9.jpg)'s color is red and the picture(a.jpg-f.jpg)'s color is blue, but when I test it I found sometime the color of new image will make some mistake, such as red digital picture became white-blue and the blue digital picture became white-red. Setting: Apache2.0.44+PHP4.3.1 you can see the demo at http://www.blists.com/image.html please refresh it some times. thank you! <?php session_start(); $DIR_SET['vcode'] = "http://www.blists.com/images/vcode"; function Vcode($num = "",$type = "") { $string = array( 'digit'=>'0123456789', 'alpha'=>'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'mixed'=>'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'shortmixed'=>'01234567ABCDEF' ); $str = ""; if ($num == "") $num = 4; if ($type == "") $type = "mixed"; for ($i=0;$i<$num;$i++) { $offset = rand(0,strlen($string[$type])-1); $str .= @substr($string[$type],$offset,1); } return $str; } $str = Vcode(5,"shortmixed"); $_SESSION['vcode'] = md5($str); header("Content-Type:image/jpeg"); $src_im = imagecreate(100,18); $x = 0; for ($i=0;$i<strlen($str);$i++) { $image = substr($str,$i,1); $dst_im = imagecreatefromjpeg($DIR_SET['vcode']."/".$image.".jpg"); imagecopymerge($src_im,$dst_im,$x,0,0,0,20,18,100); $x+=20; } imagejpeg($src_im); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22756&edit=1