ObjectClassificationTriplet.CLASS_TIME_INVARIANT_PAGINATED_PRESENTATION_OBJECT,
objectType, dataInContainer, containerHasOEG, dataInOCD);
- objectContainer.setInputStream(dataObjectInfo.getInputStream());
+ objectContainer.setData(dataObjectInfo.getData());
return objectContainer;
}
} else {
imageObj.setIDESize((byte) imageObjectInfo.getBitsPerPixel());
}
+
imageObj.setData(imageObjectInfo.getData());
return imageObj;
package org.apache.fop.afp;
-import java.io.InputStream;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.fop.afp.modca.Registry;
/** the data object height */
private int dataHeight;
- /** the object data in an inputstream */
- private InputStream inputStream;
-
/** the object registry mimetype */
private String mimeType;
+ /** the object data in a byte array */
+ private byte[] data;
+
+ /** the object data height resolution */
+ private int dataHeightRes;
+
+ /** the object data width resolution */
+ private int dataWidthRes;
+
/**
* Default constructor
*/
return this.objectAreaInfo;
}
- /** {@inheritDoc} */
- public String toString() {
- return "AFPDataObjectInfo{"
- + "mimeType=" + mimeType
- + ", dataWidth=" + dataWidth
- + ", dataHeight=" + dataHeight
- + (objectAreaInfo != null ? ", objectAreaInfo=" + objectAreaInfo : "")
- + (resourceInfo != null ? ", resourceInfo=" + resourceInfo : "");
- }
-
/**
* Returns the uri of this data object
*
}
/**
- * Sets the object data inputstream
+ * Returns the data height resolution
+ *
+ * @return the data height resolution
+ */
+ public int getDataHeightRes() {
+ return this.dataHeightRes;
+ }
+
+ /**
+ * Sets the data width resolution
+ *
+ * @param dataWidthRes the data width resolution
+ */
+ public void setDataHeightRes(int dataHeightRes) {
+ this.dataHeightRes = dataHeightRes;
+ }
+
+ /**
+ * Returns the data width resolution
+ *
+ * @return the data width resolution
+ */
+ public int getDataWidthRes() {
+ return this.dataWidthRes;
+ }
+
+ /**
+ * Sets the data width resolution
+ *
+ * @param dataWidthRes the data width resolution
+ */
+ public void setDataWidthRes(int dataWidthRes) {
+ this.dataWidthRes = dataWidthRes;
+ }
+
+ /**
+ * Sets the object data
*
- * @param inputStream the object data inputstream
+ * @param data the object data
*/
- public void setInputStream(InputStream inputStream) {
- this.inputStream = inputStream;
+ public void setData(byte[] data) {
+ this.data = data;
}
/**
- * Returns the object data inputstream
+ * Returns the object data
*
- * @return the object data inputstream
+ * @return the object data
*/
- public InputStream getInputStream() {
- return this.inputStream;
+ public byte[] getData() {
+ return this.data;
}
+ /** {@inheritDoc} */
+ public String toString() {
+ return "AFPDataObjectInfo{"
+ + "mimeType=" + mimeType
+ + ", dataWidth=" + dataWidth
+ + ", dataHeight=" + dataHeight
+ + ", dataWidthRes=" + dataWidthRes
+ + ", dataHeightRes=" + dataHeightRes
+ + (objectAreaInfo != null ? ", objectAreaInfo=" + objectAreaInfo : "")
+ + (resourceInfo != null ? ", resourceInfo=" + resourceInfo : "");
+ }
}
* A list of parameters associated with an image
*/
public class AFPImageObjectInfo extends AFPDataObjectInfo {
+
/** number of bits per pixel used */
private int bitsPerPixel;
/** compression type if any */
private int compression = -1;
- /** the object data in a byte array */
- private byte[] data;
-
/**
* Default constructor
*/
this.compression = compression;
}
- /**
- * Sets the object data
- *
- * @param data the object data
- */
- public void setData(byte[] data) {
- this.data = data;
- }
-
- /**
- * Returns the object data
- *
- * @return the object data
- */
- public byte[] getData() {
- return this.data;
- }
-
/** {@inheritDoc} */
public String toString() {
return "AFPImageObjectInfo{" + super.toString()
+ ", bitsPerPixel=" + bitsPerPixel
+ "}";
}
-
}
\ No newline at end of file
}
/**
- * Set the data image store information.
+ * Set the image data (can be byte array or inputstream)
*
* @param imageData the image data
*/
os.write(getExternalAlgorithmParameter());
- // Image Data
- if (data != null) {
- final byte[] dataHeader = new byte[] {
+ final byte[] dataHeader = new byte[] {
(byte)0xFE, // ID
(byte)0x92, // ID
0x00, // length
0x00 // length
};
- final int lengthOffset = 2;
+ final int lengthOffset = 2;
+
+ // Image Data
+ if (data != null) {
writeChunksToStream(data, dataHeader, lengthOffset, MAX_DATA_LEN, os);
}
}
*
* @param data the image data
*/
- public void setData(byte[] data) {
- getImageContent().setImageData(data);
+ public void setData(byte[] imageData) {
+ getImageContent().setImageData(imageData);
}
/** {@inheritDoc} */
/** {@inheritDoc} */
protected void writeContent(OutputStream os) throws IOException {
+ writeTriplets(os);
if (objectEnvironmentGroup != null) {
objectEnvironmentGroup.writeToStream(os);
}
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.apache.fop.afp.AFPDataObjectInfo;
import org.apache.fop.afp.AFPImageObjectInfo;
-import org.apache.fop.afp.AFPObjectAreaInfo;
import org.apache.fop.afp.Factory;
import org.apache.fop.afp.ioca.ImageSegment;
int dataWidth = imageObjectInfo.getDataWidth();
int dataHeight = imageObjectInfo.getDataHeight();
- AFPObjectAreaInfo objectAreaInfo = dataObjectInfo.getObjectAreaInfo();
- int widthRes = objectAreaInfo.getWidthRes();
- int heightRes = objectAreaInfo.getHeightRes();
+// AFPObjectAreaInfo objectAreaInfo = dataObjectInfo.getObjectAreaInfo();
+// int widthRes = objectAreaInfo.getWidthRes();
+// int heightRes = objectAreaInfo.getHeightRes();
+ int dataWidthRes = imageObjectInfo.getDataWidthRes();
+ int dataHeightRes = imageObjectInfo.getDataWidthRes();
ImageDataDescriptor imageDataDescriptor
- = factory.createImageDataDescriptor(dataWidth, dataHeight, widthRes, heightRes);
+ = factory.createImageDataDescriptor(dataWidth, dataHeight, dataWidthRes, dataHeightRes);
getObjectEnvironmentGroup().setDataDescriptor(imageDataDescriptor);
- getImageSegment().setImageSize(dataWidth, dataHeight, widthRes, heightRes);
+ getImageSegment().setImageSize(dataWidth, dataHeight, dataWidthRes, dataHeightRes);
}
/**
*
* @param data the image data
*/
- public void setData(byte[] data) {
- getImageSegment().setData(data);
+ public void setData(byte[] imageData) {
+ getImageSegment().setData(imageData);
}
/** {@inheritDoc} */
package org.apache.fop.afp.modca;
import java.io.IOException;
-import java.io.InputStream;
import java.io.OutputStream;
-import org.apache.commons.io.IOUtils;
import org.apache.fop.afp.AFPDataObjectInfo;
import org.apache.fop.afp.AFPObjectAreaInfo;
import org.apache.fop.afp.AFPResourceInfo;
/** the object container data maximum length */
private static final int MAX_DATA_LEN = 32759;
- private InputStream inputStream;
+ private byte[] data;
/**
* Main constructor
copySF(dataHeader, SF_CLASS, Type.DATA, Category.OBJECT_CONTAINER);
final int lengthOffset = 1;
- copyChunks(dataHeader, lengthOffset, MAX_DATA_LEN, inputStream, os);
- IOUtils.closeQuietly(inputStream);
+ if (data != null) {
+ writeChunksToStream(data, dataHeader, lengthOffset, MAX_DATA_LEN, os);
+ }
}
/** {@inheritDoc} */
*
* @param inputStream the inputstream for the object container data
*/
- public void setInputStream(InputStream inputStream) {
- this.inputStream = inputStream;
+ public void setData(byte[] data) {
+ this.data = data;
}
}
* @param handler the ImageHandler instance
*/
public synchronized void addHandler(ImageHandler handler) {
- Class[] imageClasses = handler.getSupportedImageClasses();
- for (int i = 0; i < imageClasses.length; i++) {
- this.handlers.put(imageClasses[i], handler);
- }
+ this.handlers.put(handler.getSupportedImageClass(), handler);
//Sorted insert
ListIterator iter = this.handlerList.listIterator();
package org.apache.fop.render;
-import org.apache.xmlgraphics.image.loader.Image;
import org.apache.xmlgraphics.image.loader.ImageFlavor;
public interface ImageHandler {
/**
* Returns the priority for this image handler. A lower value means higher priority. This
- * information is used to build the ordered/prioritized list of supported ImageFlavors for
- * the PDF renderer. The built-in handlers use priorities between 100 and 999.
+ * information is used to build the ordered/prioritized list of supported ImageFlavors.
+ * The built-in handlers use priorities between 100 and 999.
* @return a positive integer (>0) indicating the priority
*/
int getPriority();
ImageFlavor[] getSupportedImageFlavors();
/**
- * Returns the {@link Image} subclasses supported by this instance.
- * @return the Image types
+ * Returns the {@link Class} subclass supported by this instance.
+ * @return the image Class type
*/
- Class[] getSupportedImageClasses();
+ Class getSupportedImageClass();
}
import org.apache.fop.afp.AFPUnitConverter;
import org.apache.fop.render.ImageHandler;
+/**
+ * A base abstract AFP image handler
+ */
public abstract class AFPImageHandler implements ImageHandler {
private static final int X = 0;
private static final int Y = 1;
ImageFlavor.GRAPHICS2D
};
- private static final Class[] CLASSES = new Class[] {
- ImageGraphics2D.class
- };
-
/** {@inheritDoc} */
public AFPDataObjectInfo generateDataObjectInfo(
AFPRendererImageInfo rendererImageInfo) throws IOException {
}
/** {@inheritDoc} */
- public Class[] getSupportedImageClasses() {
- return CLASSES;
+ public Class getSupportedImageClass() {
+ return ImageGraphics2D.class;
}
/** {@inheritDoc} */
import org.apache.fop.afp.AFPDataObjectInfo;
import org.apache.fop.afp.AFPImageObjectInfo;
-import org.apache.fop.afp.AFPObjectAreaInfo;
import org.apache.xmlgraphics.image.loader.ImageFlavor;
-import org.apache.xmlgraphics.image.loader.ImageSize;
import org.apache.xmlgraphics.image.loader.impl.ImageRawCCITTFax;
/**
- * PDFImageHandler implementation which handles CCITT encoded images (CCITT fax group 3/4).
+ * AFPImageHandler implementation which handles CCITT encoded images (CCITT fax group 3/4).
*/
-public class AFPImageHandlerRawCCITTFax extends AFPImageHandler {
+public class AFPImageHandlerRawCCITTFax extends AbstractAFPImageHandlerRawStream {
private static final ImageFlavor[] FLAVORS = new ImageFlavor[] {
ImageFlavor.RAW_CCITTFAX,
};
- private static final Class[] CLASSES = new Class[] {
- ImageRawCCITTFax.class,
- };
-
/** {@inheritDoc} */
public AFPDataObjectInfo generateDataObjectInfo(
AFPRendererImageInfo rendererImageInfo) throws IOException {
= (AFPImageObjectInfo)super.generateDataObjectInfo(rendererImageInfo);
ImageRawCCITTFax ccitt = (ImageRawCCITTFax) rendererImageInfo.getImage();
- imageObjectInfo.setCompression(ccitt.getCompression());
-
- AFPObjectAreaInfo objectAreaInfo = imageObjectInfo.getObjectAreaInfo();
- ImageSize imageSize = ccitt.getSize();
- int widthRes = (int) (imageSize.getDpiHorizontal() * 10);
- objectAreaInfo.setWidthRes(widthRes);
-
- int heightRes = (int) (imageSize.getDpiVertical() * 10);
- objectAreaInfo.setHeightRes(heightRes);
-
- imageObjectInfo.setInputStream(ccitt.createInputStream());
+ int compression = ccitt.getCompression();
+ imageObjectInfo.setCompression(compression);
+ imageObjectInfo.setBitsPerPixel(1);
return imageObjectInfo;
}
}
/** {@inheritDoc} */
- public Class[] getSupportedImageClasses() {
- return CLASSES;
+ public Class getSupportedImageClass() {
+ return ImageRawCCITTFax.class;
}
/** {@inheritDoc} */
package org.apache.fop.render.afp;
-import java.io.IOException;
-import java.io.InputStream;
-
import org.apache.fop.afp.AFPDataObjectInfo;
-import org.apache.fop.afp.AFPObjectAreaInfo;
-import org.apache.fop.afp.AFPPaintingState;
import org.apache.xmlgraphics.image.loader.ImageFlavor;
-import org.apache.xmlgraphics.image.loader.ImageInfo;
-import org.apache.xmlgraphics.image.loader.impl.ImageRawCCITTFax;
-import org.apache.xmlgraphics.image.loader.impl.ImageRawEPS;
-import org.apache.xmlgraphics.image.loader.impl.ImageRawJPEG;
import org.apache.xmlgraphics.image.loader.impl.ImageRawStream;
/**
* AFPImageHandler implementation which handles raw stream images.
*/
-public class AFPImageHandlerRawStream extends AFPImageHandler {
+public class AFPImageHandlerRawStream extends AbstractAFPImageHandlerRawStream {
private static final ImageFlavor[] FLAVORS = new ImageFlavor[] {
ImageFlavor.RAW_JPEG,
- ImageFlavor.RAW_CCITTFAX,
ImageFlavor.RAW_EPS,
};
- private static final Class[] CLASSES = new Class[] {
- ImageRawJPEG.class,
- ImageRawCCITTFax.class,
- ImageRawEPS.class
- };
-
- /** {@inheritDoc} */
- public AFPDataObjectInfo generateDataObjectInfo(
- AFPRendererImageInfo rendererImageInfo) throws IOException {
- AFPDataObjectInfo dataObjectInfo = super.generateDataObjectInfo(rendererImageInfo);
- ImageInfo imageInfo = rendererImageInfo.getImageInfo();
- String mimeType = imageInfo.getMimeType();
- if (mimeType != null) {
- dataObjectInfo.setMimeType(mimeType);
- }
- ImageRawStream rawStream = (ImageRawStream) rendererImageInfo.getImage();
-
- AFPObjectAreaInfo objectAreaInfo = dataObjectInfo.getObjectAreaInfo();
-
- AFPRendererContext rendererContext
- = (AFPRendererContext)rendererImageInfo.getRendererContext();
- AFPInfo afpInfo = rendererContext.getInfo();
- AFPPaintingState paintingState = afpInfo.getPaintingState();
- int resolution = paintingState.getResolution();
- objectAreaInfo.setWidthRes(resolution);
- objectAreaInfo.setHeightRes(resolution);
-
- InputStream inputStream = rawStream.createInputStream();
- dataObjectInfo.setInputStream(inputStream);
-
- int dataHeight = rawStream.getSize().getHeightPx();
- dataObjectInfo.setDataHeight(dataHeight);
-
- int dataWidth = rawStream.getSize().getWidthPx();
- dataObjectInfo.setDataWidth(dataWidth);
- return dataObjectInfo;
- }
-
/** {@inheritDoc} */
public int getPriority() {
- return 100;
+ return 200;
}
/** {@inheritDoc} */
- public Class[] getSupportedImageClasses() {
- return CLASSES;
+ public Class getSupportedImageClass() {
+ return ImageRawStream.class;
}
/** {@inheritDoc} */
import org.apache.fop.afp.AFPObjectAreaInfo;
import org.apache.fop.afp.AFPPaintingState;
import org.apache.xmlgraphics.image.loader.ImageFlavor;
-import org.apache.xmlgraphics.image.loader.impl.ImageBuffered;
import org.apache.xmlgraphics.image.loader.impl.ImageRendered;
import org.apache.xmlgraphics.ps.ImageEncodingHelper;
import org.apache.xmlgraphics.util.MimeConstants;
ImageFlavor.RENDERED_IMAGE
};
- private static final Class[] CLASSES = new Class[] {
- ImageBuffered.class,
- ImageRendered.class
- };
-
/** {@inheritDoc} */
public AFPDataObjectInfo generateDataObjectInfo(
AFPRendererImageInfo rendererImageInfo) throws IOException {
AFPImageObjectInfo imageObjectInfo
= (AFPImageObjectInfo)super.generateDataObjectInfo(rendererImageInfo);
- imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS45);
-
- AFPObjectAreaInfo objectAreaInfo = imageObjectInfo.getObjectAreaInfo();
AFPRendererContext rendererContext
= (AFPRendererContext)rendererImageInfo.getRendererContext();
AFPInfo afpInfo = rendererContext.getInfo();
AFPPaintingState paintingState = afpInfo.getPaintingState();
int resolution = paintingState.getResolution();
- objectAreaInfo.setWidthRes(resolution);
- objectAreaInfo.setHeightRes(resolution);
+
+ imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS45);
+ imageObjectInfo.setDataHeightRes(resolution);
+ imageObjectInfo.setDataWidthRes(resolution);
ImageRendered imageRendered = (ImageRendered) rendererImageInfo.img;
RenderedImage renderedImage = imageRendered.getRenderedImage();
}
imageObjectInfo.setData(imageData);
+ // set object area info
+ AFPObjectAreaInfo objectAreaInfo = imageObjectInfo.getObjectAreaInfo();
+ objectAreaInfo.setWidthRes(resolution);
+ objectAreaInfo.setHeightRes(resolution);
+
return imageObjectInfo;
}
}
/** {@inheritDoc} */
- public Class[] getSupportedImageClasses() {
- return CLASSES;
+ public Class getSupportedImageClass() {
+ return ImageRendered.class;
}
/** {@inheritDoc} */
ImageFlavor.XML_DOM,
};
- private static final Class[] CLASSES = new Class[] {
- ImageXMLDOM.class,
- };
-
/** {@inheritDoc} */
public AFPDataObjectInfo generateDataObjectInfo(AFPRendererImageInfo rendererImageInfo)
throws IOException {
}
/** {@inheritDoc} */
- public Class[] getSupportedImageClasses() {
- return CLASSES;
+ public Class getSupportedImageClass() {
+ return ImageXMLDOM.class;
}
/** {@inheritDoc} */
import org.apache.fop.render.RendererContext;
import org.apache.fop.render.afp.extensions.AFPElementMapping;
import org.apache.fop.render.afp.extensions.AFPPageSetup;
-import org.apache.fop.util.AbstractPaintingState;
import org.apache.xmlgraphics.image.loader.ImageException;
import org.apache.xmlgraphics.image.loader.ImageFlavor;
import org.apache.xmlgraphics.image.loader.ImageInfo;
return paintingState.getResolution();
}
- /**
- * Returns the current AFP state
- *
- * @return the current AFP state
- */
- public AbstractPaintingState getState() {
- return this.paintingState;
- }
-
/**
* Sets the default resource group file path
* @param filePath the default resource group file path
return this.pos;
}
+ /** {@inheritDoc} */
+ public String toString() {
+ return "AFPRendererImageInfo{\n"
+ + "\turi=" + uri + ",\n"
+ + "\tinfo=" + info + ",\n"
+ + "\tpos=" + pos + ",\n"
+ + "\torigin=" + origin + ",\n"
+ + "\timg=" + img + ",\n"
+ + "\tforeignAttributes=" + foreignAttributes + ",\n"
+ + "\trendererContext=" + rendererContext + "\n"
+ + "}";
+
+ }
}
--- /dev/null
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.render.afp;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.AFPPaintingState;
+import org.apache.xmlgraphics.image.loader.ImageInfo;
+import org.apache.xmlgraphics.image.loader.ImageSize;
+import org.apache.xmlgraphics.image.loader.impl.ImageRawStream;
+
+/**
+ * A base abstract AFP raw stream image handler
+ */
+public abstract class AbstractAFPImageHandlerRawStream extends AFPImageHandler {
+
+ /** {@inheritDoc} */
+ public AFPDataObjectInfo generateDataObjectInfo(
+ AFPRendererImageInfo rendererImageInfo) throws IOException {
+ AFPDataObjectInfo dataObjectInfo = super.generateDataObjectInfo(rendererImageInfo);
+
+ ImageInfo imageInfo = rendererImageInfo.getImageInfo();
+ String mimeType = imageInfo.getMimeType();
+ if (mimeType != null) {
+ dataObjectInfo.setMimeType(mimeType);
+ }
+ ImageRawStream rawStream = (ImageRawStream) rendererImageInfo.getImage();
+ InputStream inputStream = rawStream.createInputStream();
+ try {
+ dataObjectInfo.setData(IOUtils.toByteArray(inputStream));
+ } finally {
+ IOUtils.closeQuietly(inputStream);
+ }
+
+ int dataHeight = rawStream.getSize().getHeightPx();
+ dataObjectInfo.setDataHeight(dataHeight);
+
+ int dataWidth = rawStream.getSize().getWidthPx();
+ dataObjectInfo.setDataWidth(dataWidth);
+
+ ImageSize imageSize = rawStream.getSize();
+ dataObjectInfo.setDataHeightRes((int) (imageSize.getDpiHorizontal() * 10));
+ dataObjectInfo.setDataWidthRes((int) (imageSize.getDpiVertical() * 10));
+
+ // set object area info
+ AFPObjectAreaInfo objectAreaInfo = dataObjectInfo.getObjectAreaInfo();
+ AFPRendererContext rendererContext
+ = (AFPRendererContext)rendererImageInfo.getRendererContext();
+ AFPInfo afpInfo = rendererContext.getInfo();
+ AFPPaintingState paintingState = afpInfo.getPaintingState();
+ int resolution = paintingState.getResolution();
+ objectAreaInfo.setWidthRes(resolution);
+ objectAreaInfo.setHeightRes(resolution);
+
+ return dataObjectInfo;
+ }
+
+}
ImageFlavor.GRAPHICS2D,
};
- private static final Class[] CLASSES = new Class[] {
- ImageGraphics2D.class,
- };
-
/** {@inheritDoc} */
public PDFXObject generateImage(RendererContext context, Image image,
Point origin, Rectangle pos)
}
/** {@inheritDoc} */
- public Class[] getSupportedImageClasses() {
- return CLASSES;
+ public Class getSupportedImageClass() {
+ return ImageGraphics2D.class;
}
/** {@inheritDoc} */
ImageFlavor.RAW_CCITTFAX,
};
- private static final Class[] CLASSES = new Class[] {
- ImageRawCCITTFax.class,
- };
-
/** {@inheritDoc} */
public PDFXObject generateImage(RendererContext context, Image image,
Point origin, Rectangle pos)
}
/** {@inheritDoc} */
- public Class[] getSupportedImageClasses() {
- return CLASSES;
+ public Class getSupportedImageClass() {
+ return ImageRawCCITTFax.class;
}
/** {@inheritDoc} */
ImageFlavor.RAW_JPEG,
};
- private static final Class[] CLASSES = new Class[] {
- ImageRawJPEG.class,
- };
-
/** {@inheritDoc} */
public PDFXObject generateImage(RendererContext context, Image image,
Point origin, Rectangle pos)
}
/** {@inheritDoc} */
- public Class[] getSupportedImageClasses() {
- return CLASSES;
+ public Class getSupportedImageClass() {
+ return ImageRawJPEG.class;
}
/** {@inheritDoc} */
ImageFlavor.RENDERED_IMAGE
};
- private static final Class[] CLASSES = new Class[] {
- ImageRendered.class,
- };
-
-
/** {@inheritDoc} */
public PDFXObject generateImage(RendererContext context, Image image,
Point origin, Rectangle pos)
}
/** {@inheritDoc} */
- public Class[] getSupportedImageClasses() {
- return CLASSES;
+ public Class getSupportedImageClass() {
+ return ImageRendered.class;
}
/** {@inheritDoc} */
ImageFlavor.XML_DOM,
};
- private static final Class[] CLASSES = new Class[] {
- ImageXMLDOM.class,
- };
-
/** {@inheritDoc} */
public PDFXObject generateImage(RendererContext context, Image image,
Point origin, Rectangle pos)
}
/** {@inheritDoc} */
- public Class[] getSupportedImageClasses() {
- return CLASSES;
+ public Class getSupportedImageClass() {
+ return ImageXMLDOM.class;
}
/** {@inheritDoc} */