|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-04-04 11:21 UTC] dpenezic at srce dot hr
Description: ------------ After loading image with imagecreatefrompng, seting colore with imagecolorallocate , and invoking first imagefill result with no effect (return code is TRUE). Next imagefill work correctly. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 02:00:01 2025 UTC |
Basic code : <?PHP $image = @imagecreatefrompng('some/some/some.png'); if ($image === false) { die ('Unable to open image'); } $color = imagecolorallocate($image, 0, 0, 0); imagefill($image, 200, 200, $color); # Nothing happend on image after thiss command # From this point on everything work correctly imagefill($image, 500, 500, $color); header("Content-type: image/png"); header("Content-Disposition: inline; filename=map.png"); imagepng($image); ?> I have map of country and fill some section with color, then show image in browser.