[Geoserver-devel] png8 and palletted images url param's & mimetypes

Hi Guys,

I really like the palette image support and I’m trying to use it but “image/png8” seems to be a non-standard mime type. As far as I understand PNG is supposed to encapsulate all of this metadata so it it easy inter-changable and inter-operable across the internet.

Would it be possible to add additional functionality to the palette code, allowing for greater flexibility and inter-operability with existing clients such as TileCache, and even for mobile support. I also don’t know how this would effect cascading WMS’s?

My solution should be fairly straight foward, the “palette” parameter is currently used to specify a palette file. Might I also suggest you use the same parameter for specifying the number of color’s in a quantized (on the fly) calculated palette. For example, palette=256 would do the same image/png8, but still allow the standards complient image/png mime-type to be used by connecting applications.

I hope that’s clear enough…

I’m in GeoServer to talk about this :slight_smile:

p.s. sorry if this comes thru twice I didn’t realize I was not subscribed to devel

Andrew Hughes ha scritto:

Hi Guys,

I really like the palette image support and I'm trying to use it but "image/png8" seems to be a non-standard mime type. As far as I understand PNG is supposed to encapsulate all of this metadata so it it easy inter-changable and inter-operable across the internet.

Would it be possible to add additional functionality to the palette code, allowing for greater flexibility and inter-operability with existing clients such as TileCache, and even for mobile support. I also don't know how this would effect cascading WMS's?

My solution should be fairly straight foward, the "palette" parameter is currently used to specify a palette file. Might I also suggest you use the same parameter for specifying the number of color's in a quantized (on the fly) calculated palette. For example, palette=256 would do the same image/png8, but still allow the standards complient image/png mime-type to be used by connecting applications.

I hope that's clear enough....

I'm in GeoServer to talk about this :slight_smile:

We talked a little about this. To sum up, there are two roads and
we're taking different ones today.

Andrew would like to have on the fly quantization with the ability to
specify the bits depth, so something like palette=png8/png4/png2 and
have GeoServer figure out the best fitting palette no matter what the
other options are. This is going to be expensive CPU wise, because no
matter how efficient on the fly quantization is, it has to inspect
every single pixel of the generated image.

For today I'm taking a different road, that is, if the user hasn't
specified any antialiasing, reverse engineer the palette from the SLD
style itself, provided that no external image was provided. This
would trigger in no matter what png level you chose, provided that
antialias is fully disabled, so that you get the best compressed
output the SLD allows for. This is going to be fast too, since usually
the SLD is not thousands of rules big.

Hope this helps
Cheers
Andrea