[DebianGIS-dev] CVS Update: openjump/debian/patches 02_imageio.patch

pere at haydn.debian.org pere at haydn.debian.org
Sat Mar 11 20:36:29 UTC 2006


  User: pere    
  Date: 06/03/11 20:36:29

  Added:       debian/patches 02_imageio.patch
  Log:
  Get the build working (except missing buoy).
  
  Revision  Changes    Path
  1.1                  openjump/debian/patches/02_imageio.patch
  
  CVSWEB Options: -------------------
  
  CVSWeb: Annotate this file:            http://cvs.alioth.debian.org/cgi-bin/cvsweb.cgi/pkg-grass/openjump/debian/patches/02_imageio.patch?annotate=1.1&cvsroot=
  
  CVSWeb: View this file:             http://cvs.alioth.debian.org/cgi-bin/cvsweb.cgi/pkg-grass/openjump/debian/patches/02_imageio.patch?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=
  
  -----------------------------------
  
  Index: 02_imageio.patch
  ===================================================================
  --- openjump-1.0.orig/src/org/openjump/io/SIDLayer.java
  +++ openjump-1.0/src/org/openjump/io/SIDLayer.java
  @@ -52,11 +52,12 @@
   import java.util.Iterator;
   import java.util.List;
   
  +import javax.imageio.ImageIO;
  +import javax.imageio.ImageReader;
  +import javax.imageio.stream.FileImageInputStream;
  +
   import org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn;
   
  -import com.sun.image.codec.jpeg.JPEGCodec;
  -import com.sun.image.codec.jpeg.JPEGDecodeParam;
  -import com.sun.image.codec.jpeg.JPEGImageDecoder;
   import com.vividsolutions.jts.geom.Envelope;
   import com.vividsolutions.jts.util.Assert;
   import com.vividsolutions.jump.I18N;
  @@ -291,10 +292,11 @@
                       
                       if (((jpgFile.exists()) && (jpgFile.isFile()) && (jpgFile.canRead())))
                       {
  -                        FileInputStream in = new FileInputStream(jpgFilename);
  -                        JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(in);
  -                        JPEGDecodeParam dp = decoder.getJPEGDecodeParam();
  -                        BufferedImage image = decoder.decodeAsBufferedImage();
  +			FileImageInputStream in = new FileImageInputStream(new File(jpgFilename));
  +                        ImageReader decoder = (ImageReader) ImageIO.getImageReadersByFormatName("JPEG");
  +			decoder.setInput(in);
  +                        BufferedImage image = decoder.read(0);
  +                        decoder.dispose();
                           in.close();
   
                           if (!sid_colorspace.equals("GREYSCALE"))
  
  
  



More information about the Pkg-grass-devel mailing list