[geotk] Next step for WMS

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Mon Aug 31 10:23:54 EDT 2009


Hello Sam

Sam B a écrit :
> IT WORKS NOW !! Incredible, I just uninstalled JAI-ImageIO, and voilà, 
> it displays correctly.....

Goods new :). I was not knowledgeable enough about the code involved to follow 
the details of this issue, but the conclusion that you reached leads me to the 
following suspect:

Some ImageReader codecs are defined in both Standard Java (JSE) and JAI-ImageIO, 
but their quality are variable. Based on our experience:

   * For PNG,  the JSE codec is better than the JAI one.
   * For TIFF, the JAI codec is better than the JSE one.
   * For JPEG, I have not noticed a difference yet...

By default, if both JAI and JSE codecs are available, the selected one is 
indetermined. Sometime it will be the JSE codec, and sometime the JAI one (it 
can vary between 2 execution of the same application). But you can setup your 
own preference and make the selection determinist by using 
javax.imageio.spi.ServiceRegistry API. To make that easier, you can just invoke 
the following method, which will setup some default codecs order based on our 
experience:

   org.geotoolkit.image.jai.Registry.setDefaultCodecPreferences();

	Martin


More information about the Geotoolkit mailing list