Hi Devs,<br><br>According to  <a href="http://trac.osgeo.org/mapserver/ticket/3201">http://trac.osgeo.org/mapserver/ticket/3201</a> it looks like the implementations of msSaveImageBufferGD and msSaveImageGD are getting largely out of sync.<br>
In msSaveImageBufferGD the implementation of msSaveImageRGBAPalette and msSaveImageRGBAQuantized is completely missing and this one doesn&#39;t support the QUANTIZE_NEW option either.<br>I consider this as a critical issue for the mapscript users which should also be fixed in the stable branch. I&#39;ve prepared a new version of msSaveImageBufferGD which would use the same internal method as what msSaveImageGD is using when saving the image (msSaveImageGDCtx). See the implementation below:<br>
<br>unsigned char *msSaveImageBufferGD(imageObj *img, int *size_ptr, outputFormatObj *format)<br>{<br>  unsigned char *imgbytes;<br>  <br>  gdIOCtx *ctx = gdNewDynamicCtx (2048, NULL);<br>  if (msSaveImageGDCtx( img, ctx, format ) == MS_SUCCESS)<br>
    imgbytes = gdDPExtractData (ctx, size_ptr);<br>  else<br>    imgbytes = NULL;<br><br>  ctx-&gt;gd_free(ctx);<br><br>  return imgbytes;<br>}<br><br><br>Any objection to apply this fix in both the trunk and the stable(5-6) branch?<br>
<br>Best regards,<br><br>Tamas<br><br>