Ticket #15683: jaiext.patch

File jaiext.patch, 1.4 KB (added by george-hopkins, 8 years ago)
  • geotools/src/org/openstreetmap/josm/plugins/geotools/GeoToolsPlugin.java

    diff --git a/geotools/src/org/openstreetmap/josm/plugins/geotools/GeoToolsPlugin.java b/geotools/src/org/openstreetmap/josm/plugins/geotools/GeoToolsPlugin.java
    index 000756d..e714627 100644
    a b import javax.imageio.spi.IIOServiceProvider;  
    1111import javax.media.jai.JAI;
    1212import javax.media.jai.OperationRegistry;
    1313
     14import org.geotools.image.ImageWorker;
    1415import org.geotools.referencing.CRS;
    1516import org.opengis.referencing.FactoryException;
    1617import org.opengis.referencing.NoSuchAuthorityCodeException;
    public class GeoToolsPlugin extends Plugin {  
    4142        // See https://www.java.net/node/666373
    4243        System.setProperty("com.sun.media.jai.disableMediaLib", "true");
    4344
     45        // As JAI-Ext will replace the operation registry, it needs to be loaded before we modify it later on
     46        if (ImageWorker.isJaiExtEnabled()) {
     47            Logging.debug("geotools: load JAI-Ext operations");
     48        }
     49
    4450        // As the JAI jars are bundled in the geotools plugin, JAI initialization does not work,
    4551        // so we need to perform the tasks described here ("Initialization and automatic loading of registry objects"):
    4652        // http://docs.oracle.com/cd/E17802_01/products/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/OperationRegistry.html