diff --git a/echosvg-codec/src/main/java/io/sf/carte/echosvg/ext/awt/image/codec/png/PNGImage.java b/echosvg-codec/src/main/java/io/sf/carte/echosvg/ext/awt/image/codec/png/PNGImage.java index eade9c889..3f7782c02 100644 --- a/echosvg-codec/src/main/java/io/sf/carte/echosvg/ext/awt/image/codec/png/PNGImage.java +++ b/echosvg-codec/src/main/java/io/sf/carte/echosvg/ext/awt/image/codec/png/PNGImage.java @@ -19,14 +19,11 @@ package io.sf.carte.echosvg.ext.awt.image.codec.png; import java.awt.Color; -import java.awt.Graphics2D; import java.awt.Point; import java.awt.Transparency; import java.awt.color.ColorSpace; import java.awt.color.ICC_ColorSpace; import java.awt.color.ICC_Profile; -import java.awt.geom.AffineTransform; -import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.ComponentColorModel; import java.awt.image.DataBuffer; @@ -48,7 +45,6 @@ import java.util.Collections; import java.util.Date; import java.util.GregorianCalendar; -import java.util.Hashtable; import java.util.List; import java.util.Locale; import java.util.TimeZone; @@ -1929,30 +1925,4 @@ private void decodeImage(boolean useInterlacing) { } } - /** - * Convert to a {@code BufferedImage}. - *
- * This method is experimental and could be removed without warning. - *
- * - * @return the {@code BufferedImage}. - */ - BufferedImage toBufferedImage() { - ColorModel cm = getColorModel(); - SampleModel sm = getSampleModel(); - - Point loc = new Point(getMinX(), getMinY()); - - WritableRaster raster = Raster.createWritableRaster(sm, loc); - HashtableBufferedImage
that contains the decoded contents of
- * the SeekableStream
associated with this
- * ImageDecoder
. The given page of a multi-page image is decoded.
- * Page numbering begins at zero.
- * - * This method is experimental and could be removed in the future. - *
- * - * @param page The page to be decoded. - * @throws IOException if the page does not exist. - */ - BufferedImage decodeAsBufferedImage(int page) throws IOException { - if (page != 0) { - throw new IOException(PropertyUtil.formatMessage("PNGImageDecoder.unknown.page", - new Object[] { page })); - } - - PNGImage png = new PNGImage(input, (PNGDecodeParam) param); - - return png.toBufferedImage(); - } - }