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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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.
<?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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 14:01:32 2025 UTC