php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #277 ImageSetPixel(image,x,y,color) always set the pixel (y,y)
Submitted: 1998-04-16 04:32 UTC Modified: 1998-04-16 07:55 UTC
From: diyu at eeis dot ustc dot edu dot cn Assigned: rasmus (profile)
Status: Closed Package: Performance problem
PHP Version: 3.0 Release Candidate 3 OS: Linux(2.0.18)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: diyu at eeis dot ustc dot edu dot cn
New email:
PHP Version: OS:

 

 [1998-04-16 04:32 UTC] diyu at eeis dot ustc dot edu dot cn
<?
	Header("Content-type: image/gif");
	$img = ImageCreate(256,256);
	$col1 = ImageColorAllocate($img,0,0,0);
	$col2 = ImageColorAllocate($img,255,0,0);
	ImageSetPixel($img,255,0,$col2);
	ImageSetPixel($img,255,1,$col2);
	ImageSetPixel($img,255,3,$col2);
	ImageSetPixel($img,255,4,$col2);
	ImageGif($img);
	ImageDestroy($img);
?>

The script only sets pixels on (0,0) to (4,4)

The problem comes from a wrongly-written line
in functions/gd.c(line 661):
	x = yarg->value.lval;
I think it should be:
	x = xarg->value.lval;

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-16 07:55 UTC] rasmus
This was fixed a little while ago. 
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Aug 08 10:01:25 2020 UTC