|  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.
Block user comment
Status: Assign to:
Bug Type:
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);

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;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-16 07:55 UTC] rasmus
This was fixed a little while ago. 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 13 22:01:24 2021 UTC