php.net |  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
1 + 7 = ?
Subscribe to this entry?

 
 [2001-12-30 05:59 UTC] sps at hosix dot ntu-kpi dot kiev dot ua
Rectangle is not colored with defined color.
<?php
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);

ImageJpeg($im); 
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.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-17 11:53 UTC] sander@php.net
This is very likely to be not a bug in PHP but in GD.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 07:01:29 2024 UTC