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
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: 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

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-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 24 10:03:36 2021 UTC