24 bit to 8 bit gd conversion

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Sun Feb 26 15:02:35 EST 2006


Hi There,

  We were doing few tests last week on the possiblity to do 24 bit 
rendering using png24 and convert the output to 8 bit at the end. The 
main reason being that we had issues with the color limitation on some 
of the maps we were using. And also the fact that antialising was only 
available in 24bits.
  We were experimenting with the gd function 
gdImageCreatePaletteFromTrueColor(img, 0, 256);  to achieve that, 
calling the fucntion just before the save.
  It seems to give decent results, although I think we need to do more 
tests and there seems to be an issue with transparencies.
  The idea was that if It was a good enough, It could make it into 
something like an outputformat option.

  What do you think in general about this issue ?

  Thanks

-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-dev mailing list