From:             [EMAIL PROTECTED]
Operating system: Darwin 6.1 (Mac 10.2.1)
PHP version:      4CVS-2002-10-06
PHP Bug Type:     GD related
Bug description:  ImageTrueColorToPalette() ignores color parameter

imagetruecolortopalette() is:
void imagetruecolortopalette ( resource image, bool dither, int ncolors)

but the function seems to ignore my ncolors input. ncolors  should be the
maximum number of colors in the output image. (and I cannot tell if dither
works)

Test script:
<?php
header( "Content-type: image/png" );

$medimg = $_SERVER['DOCUMENT_ROOT'] .
"/riverdata/images/world_map_med.gd2";
$img = ImageCreateFromGD2Part( $medimg, 900, 500, 800, 600 );

//Avoid bug #19418
$medimg = ImageCreateTrueColor( 800, 600 );
ImageCopy( $medimg, $img, 0, 0, 0, 0, 800, 600 );
ImageDestroy( $img );
$img = $medimg;

ImageTrueColorToPalette( $img, FALSE, 2 );

ImagePNG( $img );
ImageDestroy( $img );
?>

You can find the GD2 image that I am using here:
http://144.92.10.251/riverdata/images/world_map_med.gd2

The previous episode in this saga can be seen here:
http://bugs.php.net/bug.php?id=19704
-- 
Edit bug report at http://bugs.php.net/?id=19781&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=19781&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=19781&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=19781&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=19781&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=19781&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=19781&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=19781&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=19781&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=19781&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=19781&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19781&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=19781&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=19781&r=isapi

Reply via email to