PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Oct 18, 2018 1:15 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Oct 19, 2004 10:57 am 
Offline
Forum Newbie

Joined: Tue Oct 19, 2004 10:52 am
Posts: 2
Ok... I'm not sure if this is a bug w/ php or gd, or if I'm doing somthing wrong here:

Syntax: [ Download ] [ Hide ]
<?php

$img_big = imagecreatetruecolor(182, 182);

$brown=imagecolorallocate($img_big, 0xFF, 0xEF, 0xD8);

imagefill($img_big, 0, 0, $brown);

imagepng($img_big, "/usr/local/apache2/htdocs/cart/images/999999-1-big.png");

?>

Running this bit of script yields a 182x182 png image that is all black. If i reduce the imagecreatetruecolor size to 181x181 or less, it fills it with the tan-ish color specified by imagecolorallocate().

Is there some reason the imagefill wouldn't work on images larger than 181x181?

Can anyone shed some light on this?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 19, 2004 2:06 pm 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA
Moved to Graphics.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 21, 2004 6:25 pm 
Offline
Jedi Mod
User avatar

Joined: Tue Dec 21, 2004 6:03 pm
Posts: 5263
Location: usrlab.com
Interesting issue, I'll have a look into later.. in the mean time though, you could use imagefilledrectangle() instead if you're just trying to create a solid background colour.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group