|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14766 color of imagefilledrectangle is not working
Submitted: 2001-12-30 05:59 UTC Modified: 2002-03-17 11:53 UTC
From: sps at hosix dot ntu-kpi dot kiev dot ua Assigned:
Status: Closed Package: GD related
PHP Version: 4.0CVS-2001-12-3 OS: Windows 98
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: sps at hosix dot ntu-kpi dot kiev dot ua
New email:
PHP Version: OS:


 [2001-12-30 05:59 UTC] sps at hosix dot ntu-kpi dot kiev dot ua
Rectangle is not colored with defined color.
Header ("Content-type: image/jpeg");
$im = @ImageCreateFromJPEG ("5.jpg");
$bgc = ImageColorAllocate ($im, 255, 255, 255);
$tc  = ImageColorAllocate ($im, 0, 0, 0);
ImageFilledRectangle ($im, 0, 0, 150, 30, $bgc);

ImageDestroy ($im);

php 4.0.4, gd version 1.6.2

if string $im = @ImageCreateFromJPEG ("5.jpg"); changed to $im = @ImageCreate(200,100); everything is ok.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-17 11:53 UTC]
This is very likely to be not a bug in PHP but in GD.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Jun 01 19:03:36 2023 UTC