Ticket #1690 (closed enhancement: fixed)
24 bit to 8 bit gd conversion
| Reported by: | assefa | Owned by: | jmckenna |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Documentation - MapServer | Version: | unspecified |
| Severity: | minor | Keywords: | |
| Cc: |
Description (last modified by tbonfort) (diff)
e-mail conversation on the dev list Assefa : 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. Steve Lime : 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
Change History
Note: See
TracTickets for help on using
tickets.
