On Thu, Oct 20, 2011 at 7:18 PM, Gabriel Roldan <[email protected]> wrote: > Hello raster experts, > out of an issue raised in gwc land, I wonder whether we can support semi > transparent 8 bit png images (I assume we just don't so far?). > A little investigation (as I was trying to reject the proposal of using the > pngquant external program to achieve this) suggests that what we need is to > use the NeuQuant quantization algorithm[1], and surprisingly it looks like > JAI actually supports it: > <http://download.oracle.com/docs/cd/E17802_01/products/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/ColorQuantizerDescriptor.html> > So question is has this even been considered, is known to (not)work? and if > yes, do you think we could add support for it in GeoServer?
It's sometihng that has been in my wish list for a while. The neuquant algorithm in JAI does not support translucency and it's, afaik, quite slow, so it's really useless. See here: http://download.oracle.com/docs/cd/E17802_01/products/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/ColorQuantizerDescriptor.html "This operation generates an optimal lookup table (LUT) based on the provided 3-band RGB source image by executing a color quantization algorithm." The op won't work on RGBA images as far as I know. We can extend the current mediant cut, and I've put eyes on another fast C implementation that does support translucency that would need to be ported over to Java/JAI. but so far I haven't had time to work on it. It would require a few days of work to do the port and test it over the various input types, the pre-cooked palettes and so on. Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
