24 bit to 8 bit gd conversion
Yewondwossen Assefa
assefa at DMSOLUTIONS.CA
Tue Feb 28 23:08:08 EST 2006
Steve Lime wrote:
> So you're basically talking about a 24-bit GIF or PNG outformat block correct?
> Seems like a reasonable idea to me.
>
> As an aside I also wish we could do auto quantization with a format like PNG that
> supports both 8 and 24-bit pixels. For example, many applications allow you to
> set background imagery and in that case you need true color output. However,
> you typically need to use the 24-bit format when that imagery is off as well resulting
> in uncessarily large files.
>
> Perhaps we might consider a parameter like:
>
> QUANTITIZE TRUE|FALSE|AUTO
>
I filed an enhancement bug on this (1690) for both elements. Like I
mentionned, we need to do more tests to be sure that things are correct
or not. I will update the bug with the results.
Thanks.
> Steve
>
>
>>>>Yewondwossen Assefa <assefa at DMSOLUTIONS.CA> 02/26/06 2:02 PM >>>
>
> 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