[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: javax.imageio implementation

Kaffe CVS cvs-commits at kaffe.org
Mon Oct 4 10:02:22 PDT 2004


PatchSet 5248 
Date: 2004/10/04 15:36:04
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: javax.imageio implementation

2004-10-04  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/javax/imageio/IIOImage.java,
        libraries/javalib/javax/imageio/IIOParam.java,
        libraries/javalib/javax/imageio/IIOParamController.java,
        libraries/javalib/javax/imageio/ImageIO.java,
        libraries/javalib/javax/imageio/ImageReadParam.java,
        libraries/javalib/javax/imageio/ImageTypeSpecifier.java,
        libraries/javalib/javax/imageio/ImageWriteParam.java,
        libraries/javalib/javax/imageio/metadata/IIOMetadata.java,
        libraries/javalib/javax/imageio/metadata/IIOMetadataController.java,
        libraries/javalib/javax/imageio/metadata/IIOMetadataFormat.java,
        libraries/javalib/javax/imageio/spi/IIORegistry.java:
        New files from GNU Classpath.

        * libraries/javalib/Makefile.am,
        libraries/javalib/Makefile.in,
        libraries/javalib/all.files:
        Regenerated.

        * libraries/javalib/javax/imageio/ImageTranscoder.java,
        libraries/javalib/javax/imageio/spi/ImageInputStreamSpi.java,
        libraries/javalib/javax/imageio/spi/ImageOutputStreamSpi.java,
        libraries/javalib/javax/imageio/spi/ServiceRegistry.java,
        libraries/javalib/javax/imageio/stream/ImageInputStream.java,
        libraries/javalib/javax/imageio/stream/ImageOutputStream.java:
        Resynced with GNU Classpath.

        2004-10-04  Michael Koch  <konqueror at gmx.de>

        * javax/imageio/ImageWriteParam.java,
        javax/imageio/metadata/IIOMetadataFormat.java:
        Implemented.

        2004-10-04  Michael Koch  <konqueror at gmx.de>

        * javax/imageio/ImageTypeSpecifier.java:
        Mostly implemented.

        2004-10-04  Michael Koch  <konqueror at gmx.de>

        * javax/imageio/metadata/IIOMetadata.java:
        Mostly implemented.

        2004-10-04  Michael Koch  <konqueror at gmx.de>

        * javax/imageio/IIOImage.java,
        javax/imageio/ImageReadParam.java,
        javax/imageio/metadata/IIOMetadataController.java,
        javax/imageio/metadata/IIOMetadataFormat.java:
        New files.
        * javax/imageio/stream/ImageOutputStream.java:
        Implemented.

        2004-10-04  Michael Koch  <konqueror at gmx.de>

        * javax/imageio/IIOParam.java,
        javax/imageio/IIOParamController.java,
        javax/imageio/ImageTypeSpecifier.java,
        javax/imageio/ImageWriteParam.java,
        javax/imageio/metadata/IIOMetadata.java:
        New files.
        * javax/imageio/ImageTranscoder.java:
        Implemented.

        2004-10-04  Michael Koch  <konqueror at gmx.de>

        * javax/imageio/spi/ImageInputStreamSpi.java,
        javax/imageio/spi/ImageOutputStreamSpi.java:        Reworked import startments.
        * javax/imageio/spi/ServiceRegistry.java:
        Reworked import startments. Fixed XHTML in javadocs.
        (ServiceRegistry): Added @param tag to javadoc.
        * javax/imageio/stream/ImageInputStream.java
        (mark): Doesn't throws IOException;

        2004-10-04  Michael Koch  <konqueror at gmx.de>

        * javax/imageio/ImageIO.java:
        New file.

        2004-10-04  Michael Koch  <konqueror at gmx.de>

        * javax/imageio/spi/IIORegistry.java
        (static): Don't register ImageReaderSpi.class and
        ImageWriterSpi.class yet.

        2004-10-03  Michael Koch  <konqueror at gmx.de>

        * javax/imageio/spi/IIORegistry.java:
        New file.

Members: 
	ChangeLog:1.2802->1.2803 
	libraries/javalib/Makefile.am:1.242->1.243 
	libraries/javalib/Makefile.in:1.322->1.323 
	libraries/javalib/all.files:1.30->1.31 
	libraries/javalib/javax/imageio/IIOImage.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/IIOParam.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/IIOParamController.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/ImageIO.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/ImageReadParam.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/ImageTranscoder.java:1.1->1.2 
	libraries/javalib/javax/imageio/ImageTypeSpecifier.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/ImageWriteParam.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/metadata/IIOMetadata.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/metadata/IIOMetadataController.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/metadata/IIOMetadataFormat.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/spi/IIORegistry.java:INITIAL->1.1 
	libraries/javalib/javax/imageio/spi/ImageInputStreamSpi.java:1.1->1.2 
	libraries/javalib/javax/imageio/spi/ImageOutputStreamSpi.java:1.1->1.2 
	libraries/javalib/javax/imageio/spi/ServiceRegistry.java:1.1->1.2 
	libraries/javalib/javax/imageio/stream/ImageInputStream.java:1.1->1.2 
	libraries/javalib/javax/imageio/stream/ImageOutputStream.java:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2802 kaffe/ChangeLog:1.2803
--- kaffe/ChangeLog:1.2802	Mon Oct  4 14:46:18 2004
+++ kaffe/ChangeLog	Mon Oct  4 15:36:04 2004
@@ -1,5 +1,97 @@
 2004-10-04  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/javax/imageio/IIOImage.java,
+	libraries/javalib/javax/imageio/IIOParam.java,
+	libraries/javalib/javax/imageio/IIOParamController.java,
+	libraries/javalib/javax/imageio/ImageIO.java,
+	libraries/javalib/javax/imageio/ImageReadParam.java,
+	libraries/javalib/javax/imageio/ImageTypeSpecifier.java,
+	libraries/javalib/javax/imageio/ImageWriteParam.java,
+	libraries/javalib/javax/imageio/metadata/IIOMetadata.java,
+	libraries/javalib/javax/imageio/metadata/IIOMetadataController.java,
+	libraries/javalib/javax/imageio/metadata/IIOMetadataFormat.java,
+	libraries/javalib/javax/imageio/spi/IIORegistry.java:
+	New files from GNU Classpath.
+
+	* libraries/javalib/Makefile.am,
+	libraries/javalib/Makefile.in,
+	libraries/javalib/all.files:
+	Regenerated.
+
+	* libraries/javalib/javax/imageio/ImageTranscoder.java,
+	libraries/javalib/javax/imageio/spi/ImageInputStreamSpi.java,
+	libraries/javalib/javax/imageio/spi/ImageOutputStreamSpi.java,
+	libraries/javalib/javax/imageio/spi/ServiceRegistry.java,
+	libraries/javalib/javax/imageio/stream/ImageInputStream.java,
+	libraries/javalib/javax/imageio/stream/ImageOutputStream.java:
+	Resynced with GNU Classpath.
+
+	2004-10-04  Michael Koch  <konqueror at gmx.de>
+
+        * javax/imageio/ImageWriteParam.java,
+        javax/imageio/metadata/IIOMetadataFormat.java:
+        Implemented.
+
+	2004-10-04  Michael Koch  <konqueror at gmx.de>
+
+        * javax/imageio/ImageTypeSpecifier.java:
+        Mostly implemented.
+
+	2004-10-04  Michael Koch  <konqueror at gmx.de>
+
+        * javax/imageio/metadata/IIOMetadata.java:
+        Mostly implemented.
+
+	2004-10-04  Michael Koch  <konqueror at gmx.de>
+
+        * javax/imageio/IIOImage.java,
+        javax/imageio/ImageReadParam.java,
+        javax/imageio/metadata/IIOMetadataController.java,
+        javax/imageio/metadata/IIOMetadataFormat.java:
+        New files.
+        * javax/imageio/stream/ImageOutputStream.java:
+        Implemented.
+
+	2004-10-04  Michael Koch  <konqueror at gmx.de>
+
+        * javax/imageio/IIOParam.java,
+        javax/imageio/IIOParamController.java,
+        javax/imageio/ImageTypeSpecifier.java,
+        javax/imageio/ImageWriteParam.java,
+        javax/imageio/metadata/IIOMetadata.java:
+        New files.
+        * javax/imageio/ImageTranscoder.java:
+        Implemented.
+
+	2004-10-04  Michael Koch  <konqueror at gmx.de>
+
+        * javax/imageio/spi/ImageInputStreamSpi.java,
+        javax/imageio/spi/ImageOutputStreamSpi.java:
+        Reworked import startments.
+        * javax/imageio/spi/ServiceRegistry.java:
+        Reworked import startments. Fixed XHTML in javadocs.
+        (ServiceRegistry): Added @param tag to javadoc.
+        * javax/imageio/stream/ImageInputStream.java
+        (mark): Doesn't throws IOException;
+
+	2004-10-04  Michael Koch  <konqueror at gmx.de>
+
+        * javax/imageio/ImageIO.java:
+        New file.
+
+	2004-10-04  Michael Koch  <konqueror at gmx.de>
+
+        * javax/imageio/spi/IIORegistry.java
+        (static): Don't register ImageReaderSpi.class and
+        ImageWriterSpi.class yet.
+
+	2004-10-03  Michael Koch  <konqueror at gmx.de>
+
+        * javax/imageio/spi/IIORegistry.java:
+        New file.
+
+2004-10-04  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/gnu/java/rmi/rmic/RMIC.java,
 	libraries/javalib/gnu/java/rmi/server/RMIDefaultSocketFactory.java,
 	libraries/javalib/gnu/java/rmi/server/RMIHashes.java,
Index: kaffe/libraries/javalib/Makefile.am
diff -u kaffe/libraries/javalib/Makefile.am:1.242 kaffe/libraries/javalib/Makefile.am:1.243
--- kaffe/libraries/javalib/Makefile.am:1.242	Mon Oct  4 09:01:27 2004
+++ kaffe/libraries/javalib/Makefile.am	Mon Oct  4 15:36:06 2004
@@ -212,6 +212,7 @@
 	$(javax_crypto_spec_SRCS) \
 	$(javax_imageio_SRCS) \
 	$(javax_imageio_event_SRCS) \
+	$(javax_imageio_metadata_SRCS) \
 	$(javax_imageio_spi_SRCS) \
 	$(javax_imageio_stream_SRCS) \
 	$(javax_naming_SRCS) \
@@ -2608,8 +2609,15 @@
 	javax/crypto/spec/SecretKeySpec.java
 javax_imageio_SRCS = \
 	javax/imageio/IIOException.java \
+	javax/imageio/IIOImage.java \
+	javax/imageio/IIOParam.java \
+	javax/imageio/IIOParamController.java \
+	javax/imageio/ImageIO.java \
+	javax/imageio/ImageReadParam.java \
 	javax/imageio/ImageReader.java \
 	javax/imageio/ImageTranscoder.java \
+	javax/imageio/ImageTypeSpecifier.java \
+	javax/imageio/ImageWriteParam.java \
 	javax/imageio/ImageWriter.java
 javax_imageio_event_SRCS = \
 	javax/imageio/event/IIOReadProgressListener.java \
@@ -2617,7 +2625,12 @@
 	javax/imageio/event/IIOReadWarningListener.java \
 	javax/imageio/event/IIOWriteProgressListener.java \
 	javax/imageio/event/IIOWriteWarningListener.java
+javax_imageio_metadata_SRCS = \
+	javax/imageio/metadata/IIOMetadata.java \
+	javax/imageio/metadata/IIOMetadataController.java \
+	javax/imageio/metadata/IIOMetadataFormat.java
 javax_imageio_spi_SRCS = \
+	javax/imageio/spi/IIORegistry.java \
 	javax/imageio/spi/IIOServiceProvider.java \
 	javax/imageio/spi/ImageInputStreamSpi.java \
 	javax/imageio/spi/ImageOutputStreamSpi.java \
Index: kaffe/libraries/javalib/Makefile.in
diff -u kaffe/libraries/javalib/Makefile.in:1.322 kaffe/libraries/javalib/Makefile.in:1.323
--- kaffe/libraries/javalib/Makefile.in:1.322	Mon Oct  4 09:01:28 2004
+++ kaffe/libraries/javalib/Makefile.in	Mon Oct  4 15:36:07 2004
@@ -553,6 +553,7 @@
 	$(javax_crypto_spec_SRCS) \
 	$(javax_imageio_SRCS) \
 	$(javax_imageio_event_SRCS) \
+	$(javax_imageio_metadata_SRCS) \
 	$(javax_imageio_spi_SRCS) \
 	$(javax_imageio_stream_SRCS) \
 	$(javax_naming_SRCS) \
@@ -3106,8 +3107,15 @@
 
 javax_imageio_SRCS = \
 	javax/imageio/IIOException.java \
+	javax/imageio/IIOImage.java \
+	javax/imageio/IIOParam.java \
+	javax/imageio/IIOParamController.java \
+	javax/imageio/ImageIO.java \
+	javax/imageio/ImageReadParam.java \
 	javax/imageio/ImageReader.java \
 	javax/imageio/ImageTranscoder.java \
+	javax/imageio/ImageTypeSpecifier.java \
+	javax/imageio/ImageWriteParam.java \
 	javax/imageio/ImageWriter.java
 
 javax_imageio_event_SRCS = \
@@ -3117,7 +3125,13 @@
 	javax/imageio/event/IIOWriteProgressListener.java \
 	javax/imageio/event/IIOWriteWarningListener.java
 
+javax_imageio_metadata_SRCS = \
+	javax/imageio/metadata/IIOMetadata.java \
+	javax/imageio/metadata/IIOMetadataController.java \
+	javax/imageio/metadata/IIOMetadataFormat.java
+
 javax_imageio_spi_SRCS = \
+	javax/imageio/spi/IIORegistry.java \
 	javax/imageio/spi/IIOServiceProvider.java \
 	javax/imageio/spi/ImageInputStreamSpi.java \
 	javax/imageio/spi/ImageOutputStreamSpi.java \
Index: kaffe/libraries/javalib/all.files
diff -u kaffe/libraries/javalib/all.files:1.30 kaffe/libraries/javalib/all.files:1.31
--- kaffe/libraries/javalib/all.files:1.30	Mon Oct  4 09:01:28 2004
+++ kaffe/libraries/javalib/all.files	Mon Oct  4 15:36:07 2004
@@ -2134,14 +2134,25 @@
 javax/crypto/spec/RC5ParameterSpec.java
 javax/crypto/spec/SecretKeySpec.java
 javax/imageio/IIOException.java
+javax/imageio/IIOImage.java
+javax/imageio/IIOParam.java
+javax/imageio/IIOParamController.java
+javax/imageio/ImageIO.java
+javax/imageio/ImageReadParam.java
 javax/imageio/ImageReader.java
 javax/imageio/ImageTranscoder.java
+javax/imageio/ImageTypeSpecifier.java
+javax/imageio/ImageWriteParam.java
 javax/imageio/ImageWriter.java
 javax/imageio/event/IIOReadProgressListener.java
 javax/imageio/event/IIOReadUpdateListener.java
 javax/imageio/event/IIOReadWarningListener.java
 javax/imageio/event/IIOWriteProgressListener.java
 javax/imageio/event/IIOWriteWarningListener.java
+javax/imageio/metadata/IIOMetadata.java
+javax/imageio/metadata/IIOMetadataController.java
+javax/imageio/metadata/IIOMetadataFormat.java
+javax/imageio/spi/IIORegistry.java
 javax/imageio/spi/IIOServiceProvider.java
 javax/imageio/spi/ImageInputStreamSpi.java
 javax/imageio/spi/ImageOutputStreamSpi.java
===================================================================
Checking out kaffe/libraries/javalib/javax/imageio/IIOImage.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/javax/imageio/IIOImage.java,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/javalib/javax/imageio/IIOImage.java	Mon Oct  4 17:02:21 2004
@@ -0,0 +1,138 @@
+/* IIOImage.java --
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.imageio;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.Raster;
+import java.awt.image.RenderedImage;
+import java.util.List;
+
+import javax.imageio.metadata.IIOMetadata;
+
+public class IIOImage
+{
+  protected RenderedImage image;
+  protected IIOMetadata metadata;
+  protected Raster raster;
+  protected List thumbnails;
+  
+  public IIOImage (Raster raster, List thumbnails, IIOMetadata metadata)
+  {
+    if (raster == null)
+      throw new IllegalArgumentException ("raster may not be null");
+    
+    this.raster = raster;
+    this.thumbnails = thumbnails;
+    this.metadata = metadata;
+  }
+  
+  public IIOImage (RenderedImage image, List thumbnails, IIOMetadata metadata)
+  {
+    if (image == null)
+      throw new IllegalArgumentException ("image may not be null");
+    
+    this.image = image;
+    this.thumbnails = thumbnails;
+    this.metadata = metadata;
+  }
+
+  public IIOMetadata getMetadata()
+  {
+    return metadata;
+  }
+
+  public int getNumThumbnails()
+  {
+    return thumbnails.size();
+  }
+
+  public Raster getRaster()
+  {
+    return raster;
+  }
+
+  public RenderedImage getRenderedImage()
+  {
+    return image;
+  }
+
+  public BufferedImage getThumbnail (int index)
+  {
+    return (BufferedImage) thumbnails.get (index);
+  }
+
+  public List getThumbnails()
+  {
+    return thumbnails;
+  }
+
+  public boolean hasRaster()
+  {
+    return raster != null;
+  }
+
+  public void setMetadata (IIOMetadata metadata)
+  {
+    this.metadata = metadata;
+  }
+
+  public void setRaster (Raster raster)
+  {
+    if (raster == null)
+      throw new IllegalArgumentException ("raster may not be null");
+    
+    this.image = null;
+    this.raster = raster;
+  }
+
+  public void setRenderedImage (RenderedImage image)
+  {
+    if (image == null)
+      throw new IllegalArgumentException ("image may not be null");
+
+    this.image = image;
+    this.raster = null;
+  }
+
+  public void setThumbnails (List thumbnails)
+  {
+    this.thumbnails = thumbnails;
+  }
+  
+} // class IIOParam
===================================================================
Checking out kaffe/libraries/javalib/javax/imageio/IIOParam.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/javax/imageio/IIOParam.java,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/javalib/javax/imageio/IIOParam.java	Mon Oct  4 17:02:21 2004
@@ -0,0 +1,52 @@
+/* IIOParam.java --
+   Copyright (C) 2004  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.imageio;
+
+/**
+ * @author Michael Koch (konqueror at gmx.de)
+ */
+public abstract class IIOParam
+{
+  /**
+   * Initializes an <code>IIOParam</code> object.
+   */
+  protected IIOParam()
+  {
+  }
+}
===================================================================
Checking out kaffe/libraries/javalib/javax/imageio/IIOParamController.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/javax/imageio/IIOParamController.java,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/javalib/javax/imageio/IIOParamController.java	Mon Oct  4 17:02:21 2004
@@ -0,0 +1,58 @@
+/* IIOParamController.java --
+   Copyright (C) 2004  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.imageio;
+
+/**
+ * @author Michael Koch (konqueror at gmx.de)
+ */
+public interface IIOParamController
+{
+  /**
+   * Activates the controller.
+   *
+   * @param param the <code>IIOParam</code> to be modified
+   *
+   * @return true if the <code>IIOParam</code> has been modified,
+   * false otherwise
+   * 
+   * @exception IllegalArgumentException if param is null or is not an instance
+   * of the correct class
+   */
+  boolean activate(IIOParam param);
+}
===================================================================
Checking out kaffe/libraries/javalib/javax/imageio/ImageIO.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/javax/imageio/ImageIO.java,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/javalib/javax/imageio/ImageIO.java	Mon Oct  4 17:02:21 2004
@@ -0,0 +1,53 @@
+/* ImageIO.java --
+   Copyright (C) 2004  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.imageio;
+
+import javax.imageio.spi.IIORegistry;
+
+public final class ImageIO
+{
+  /**
+   * Rescans the application classpath for ImageIO service providers
+   * and registers them.
+   */
+  public static void scanForPlugins()
+  {
+    IIORegistry.getDefaultInstance().registerApplicationClasspathSpis();
+  }
+}
===================================================================
Checking out kaffe/libraries/javalib/javax/imageio/ImageReadParam.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/javax/imageio/ImageReadParam.java,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/javalib/javax/imageio/ImageReadParam.java	Mon Oct  4 17:02:21 2004
@@ -0,0 +1,46 @@
+/* ImageReadParam.java --
+   Copyright (C) 2004  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.imageio;
+
+/**
+ * @author Michel Koch (konqueror at gmx.de)
+ */
+public class ImageReadParam extends IIOParam
+{
+}
Index: kaffe/libraries/javalib/javax/imageio/ImageTranscoder.java
diff -u kaffe/libraries/javalib/javax/imageio/ImageTranscoder.java:1.1 kaffe/libraries/javalib/javax/imageio/ImageTranscoder.java:1.2
--- kaffe/libraries/javalib/javax/imageio/ImageTranscoder.java:1.1	Tue May 18 20:23:04 2004
+++ kaffe/libraries/javalib/javax/imageio/ImageTranscoder.java	Mon Oct  4 15:36:10 2004
@@ -1,5 +1,5 @@
 /* ImageTranscoder.java -- Image metadata transcoder.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -38,9 +38,17 @@
 
 package javax.imageio;
 
+import javax.imageio.metadata.IIOMetadata;
+
+/**
+ * @author Michael Koch (konqueror at gmx.de)
+ */
 public interface ImageTranscoder
 {
-  // FIXME: Incomplete. This interface is merely present in order to
-  // allow compilation of the javax.imageio.spi package, for which GNU
-  // Classpath does provide an implementation.
+  IIOMetadata convertImageMetadata(IIOMetadata inData,
+		                   ImageTypeSpecifier imageType,
+				   ImageWriteParam param);
+
+  IIOMetadata convertStreamMetadata(IIOMetadata inData,
+				    ImageWriteParam param);
 }
===================================================================
Checking out kaffe/libraries/javalib/javax/imageio/ImageTypeSpecifier.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/javax/imageio/ImageTypeSpecifier.java,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/javalib/javax/imageio/ImageTypeSpecifier.java	Mon Oct  4 17:02:22 2004
@@ -0,0 +1,94 @@
+/* ImageTypeSpecifier.java --
+   Copyright (C) 2004  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.imageio;
+
+import java.awt.image.ColorModel;
+import java.awt.image.RenderedImage;
+import java.awt.image.SampleModel;
+
+public class ImageTypeSpecifier
+{
+  protected ColorModel colorModel;
+  protected SampleModel sampleModel;
+
+  public ImageTypeSpecifier(ColorModel colorModel, SampleModel sampleModel)
+  {
+    if (colorModel == null)
+      throw new IllegalArgumentException("colorModel may not be null");
+
+    if (sampleModel == null)
+      throw new IllegalArgumentException("sampleModel may not be null");
+
+    if (!colorModel.isCompatibleSampleModel(sampleModel))
+      throw new IllegalArgumentException
+        ("sample Model not compatible with colorModel");
+    
+    this.colorModel = colorModel;
+    this.sampleModel = sampleModel;
+  }
+
+  public ImageTypeSpecifier(RenderedImage image)
+  {
+    if (image == null)
+      throw new IllegalArgumentException("image may not be null");
+    
+    this.colorModel = image.getColorModel();
+    this.sampleModel = image.getSampleModel();
+  }
+
+  public ColorModel getColorModel()
+  {
+    return colorModel;
+  }
+
+  public int getNumBands()
+  {
+    return sampleModel.getNumBands();
+  }
+
+  public int getNumComponents()
+  {
+    return colorModel.getNumComponents();
+  }
+
+  public SampleModel getSampleModel()
+  {
+    return sampleModel;
+  }
+}
===================================================================
Checking out kaffe/libraries/javalib/javax/imageio/ImageWriteParam.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/javax/imageio/ImageWriteParam.java,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/javalib/javax/imageio/ImageWriteParam.java	Mon Oct  4 17:02:22 2004
@@ -0,0 +1,398 @@
+/* ImageWriteParam.java --
+   Copyright (C) 2004  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.imageio;
+
+import java.awt.Dimension;
+import java.util.Locale;
+
+public class ImageWriteParam extends IIOParam
+{
+  public static final int MODE_DISABLED = 0;
+  public static final int MODE_DEFAULT = 1;
+  public static final int MODE_EXPLICIT = 2;
+  public static final int MODE_COPY_FROM_METADATA = 3;
+  
+  protected boolean canOffsetTiles;
+  protected boolean canWriteCompressed;
+  protected boolean canWriteProgressive;
+  protected boolean canWriteTiles;
+  protected int compressionMode = MODE_COPY_FROM_METADATA;
+  protected float compressionQuality;
+  protected String compressionType;
+  protected String[] compressionTypes;
+  protected Locale locale;
+  protected Dimension[] preferredTileSizes;
+  protected int progressiveMode = MODE_COPY_FROM_METADATA;
+  protected int tileGridXOffset;
+  protected int tileGridYOffset;
+  protected int tileHeight;
+  protected int tileWidth;
+  protected int tilingMode;
+  protected boolean tilingSet;
+
+  /**
+   * Creates an empty <code>ImageWriteParam</code> object.
+   * The subclass is responsible to initialize all fields.
+   */
+  protected ImageWriteParam()
+  {
+    // Do nothing here.
+  }
+
+  /**
+   * Creates an <code>ImageWriteParam</code> object with the given locale.
+   *
+   * @param locale the locale to use for user visible strings
+   */
+  public ImageWriteParam(Locale locale)
+  {
+    this.locale = locale;
+  }
+
+  public float getBitRate(float quality)
+  {
+    checkNotExplicitCompression();
+    checkCompressionTypesSet();
+
+    return -1.0f;
+  }
+
+  private void checkSupportsCompression()
+  {
+    if (! canWriteCompressed())
+      throw new UnsupportedOperationException("compression not supported");
+  }
+
+  private void checkNotExplicitCompression()
+  {
+    if (getCompressionMode() != MODE_EXPLICIT)
+      throw new IllegalStateException("compression mode is not MODE_EXPLICIT");
+  }
+  
+  private void checkCompressionTypesSet()
+  {
+    if (getCompressionType() == null
+	&& getCompressionTypes() != null)
+      throw new IllegalStateException("no compression type set");
+  }
+
+  private void checkSupportsProgressiveEncoding()
+  {
+    if (! canWriteProgressive())
+      throw new UnsupportedOperationException
+	("progressive output not supported");
+  }
+  
+  private void checkSupportsTiling()
+  {
+    if (! canWriteTiles())
+      throw new UnsupportedOperationException("tiling not supported");
+  }
+
+  private void checkNotExplicitTiling()
+  {
+    if (getTilingMode() != MODE_EXPLICIT)
+      throw new IllegalStateException("tiling mode not MODE_EXPLICIT");
+  }
+
+  private void checkTilingInitialized()

*** Patch too long, truncated ***



More information about the kaffe mailing list