Date: 08/27/01
- Next message: tthiery <email protected>: "[PHP-DEV] Bug #12968 Updated: Session don't store after header("Location: ...")"
- Previous message: sniper <email protected>: "[PHP-DEV] Bug #12983 Updated: crash due to infinite loop"
- In reply to: perry <email protected>: "[PHP-DEV] Bug #12963: ImageColorAllocate() doesn't work with PNGs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 12963
Updated by: wez
Reported By: perry <email protected>
Status: Feedback
Bug Type: GD related
Operating System: Windows95
PHP Version: 4.0.6
New Comment:
PHP 4.0.6 on win32 uses GD 2.0.1 BETA.
It is broken for palette based PNG images; you
need to use a different version of GD, or wait for PHP 4.0.7.
--Wez.
Previous Comments:
------------------------------------------------------------------------
[2001-08-26 06:35:48] mathieu <email protected>
I'm not a PNG expert but you could try ImageColorResolve()
The palette used in 'basic.png' may be different than you
expect.
------------------------------------------------------------------------
[2001-08-26 06:01:52] perry <email protected>
<?php
header ("Content-type: image/png");
$text=implode($argv," ");
$image=imageCreateFromPNG("basic.png");
$background_color = ImageColorAllocate ($im, 100, 100, 255);
$text_color=imageColorAllocate($image,255,100,100);
$textX=(imageSX($image)-imageFontWidth(4)*strlen($text))/2;
imageString($image,5,$textX,10,$text,$text_color);
imagePNG($image);
imageDestroy($image);
?>
This is only a small modification of the example given in the manual, but the $text_color is always white.
This works for JPEG, but the quality suffers, and my build of PHP doesn't support GIF's.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12963&edit=1
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: tthiery <email protected>: "[PHP-DEV] Bug #12968 Updated: Session don't store after header("Location: ...")"
- Previous message: sniper <email protected>: "[PHP-DEV] Bug #12983 Updated: crash due to infinite loop"
- In reply to: perry <email protected>: "[PHP-DEV] Bug #12963: ImageColorAllocate() doesn't work with PNGs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

