xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Art Welch <ar...@EASTPOINT.COM>
Subject RE: FopImage interface - proposal
Date Mon, 18 Dec 2000 19:35:27 GMT
I have not looked very closely at the proposal, but I am curious if you
foresee any problems with maintaining JDK 1.1 support. I know that the Java
image support was expanded significantly from 1.1 to 1.2. If we use native
Java classes for image stuff, could this be a problem?

Just want to know all the implications,

P.S. Otherwise it looks good to me so far.

-----Original Message-----
From: Eric SCHAEFFER [mailto:ESCHAEFFER@Techmetrix.net]
Sent: Monday, December 18, 2000 8:47 AM
To: fop-dev@xml.apache.org
Subject: FopImage interface - proposal


Here is my proposal for the image package.

In fact, I remove dependencies with PDF stuff. The FopImage implementing
classes return image data as a BufferedImage (I like it because it contains
everything, but it could be a RenderedImage), and can give access to the
image InputStream to include the image content "asis".
The only properties that this interface provides and gives access to is the
image Mime Type, and the image size (width and height in pixels).
Maybe we could include properties like dpi, if supported by the image

The "filter" support, or the decision to include the image directly
("asis"), is delegated to the formatter (PDF, AWT, etc...)

What do you think about it ? I'm not sure on what Java class to use:
BufferedImage, RenderedImage, Raster, ...

package org.apache.fop.image;

// Java
import java.io.InputStream;
import java.net.URL;

// Java AWT
import java.awt.image.BufferedImage;

 *  Used to manipulate images in FOP. Implementing classes should provide
 *  constructors: <BR>
 *  <UL>
 *    <LI>public FopImage(URL href) throws FopImageException;
 *    <LI>public FopImage(URL href, ImageReader imgReader) throws
 *  </UL>
 * @author     <A href="eschaeffer@emahoo.com">Eric SCHAEFFER</A>
 * @created    18 décembre 2000
public interface FopImage {
	 *  Return the URL of the image.
	 * @return    The URL of the image
	public URL getURL();

	 *  Gets the Width of the image.
	 * @return                        The image's width
	 * @exception  FopImageException  when error occures
	public int getWidth() throws FopImageException;

	 *  Gets the Height of the image.
	 * @return                        The image's height
	 * @exception  FopImageException  when error occures
	public int getHeight() throws FopImageException;

	 *  Gets the Image data, as a BufferedImage.
	 * @return                        The Image data
	 * @exception  FopImageException  when error occures
	public BufferedImage getImage() throws FopImageException;
	 * or
	 * public RenderedImage getImage() throws FopImageException;

	 *  Gets the InputStream used to read the image data.
	 * @return                        The InputStream of the image
	 * @exception  FopImageException  when error occures
	public InputStream getInputStream() throws FopImageException;

	 *  Gets the MimeType associated with the image type.
	 * @return                        The MimeType of the image
	 * @exception  FopImageException  when error occures
	public String getMimeType() throws FopImageException;


Consultant TechMetrix Research
Groupe SQLi
Créateurs de sites intelligents depuis 1995

FOP, the first XSL:FO processor

View raw message