@Override public BufferedImage getImage() throws IOException { return SampledImageReader.getRGBImage(this, null); }
/** * Returns an RGB buffered image containing the opaque image stream without any masks applied. * If this Image XObject is a mask then the buffered image will contain the raw mask. * @return the image without any masks applied * @throws IOException if the image cannot be read */ public BufferedImage getOpaqueImage() throws IOException { return SampledImageReader.getRGBImage(this, null); }
@Override public BufferedImage getImage(Rectangle region, int subsampling) throws IOException { return SampledImageReader.getRGBImage(this, region, subsampling, null); }
/** * Returns the content of the given image as an AWT buffered image with an RGB color space. * If a color key mask is provided then an ARGB image is returned instead. * This method never returns null. * @param pdImage the image to read * @param colorKey an optional color key mask * @return content of this image as an RGB buffered image * @throws IOException if the image cannot be read */ public static BufferedImage getRGBImage(PDImage pdImage, COSArray colorKey) throws IOException { return getRGBImage(pdImage, null, 1, colorKey); }
BufferedImage image = SampledImageReader.getRGBImage(this, region, subsampling, getColorKeyMask());
@Override public BufferedImage getImage(Rectangle region, int subsampling) throws IOException { return SampledImageReader.getRGBImage(this, region, subsampling, null); }
/** * Returns the content of the given image as an AWT buffered image with an RGB color space. * If a color key mask is provided then an ARGB image is returned instead. * This method never returns null. * @param pdImage the image to read * @param colorKey an optional color key mask * @return content of this image as an RGB buffered image * @throws IOException if the image cannot be read */ public static BufferedImage getRGBImage(PDImage pdImage, COSArray colorKey) throws IOException { return getRGBImage(pdImage, null, 1, colorKey); }
@Override public BufferedImage getImage() throws IOException { return SampledImageReader.getRGBImage(this, null); }
/** * Returns an RGB buffered image containing the opaque image stream without any masks applied. * If this Image XObject is a mask then the buffered image will contain the raw mask. * @return the image without any masks applied * @throws IOException if the image cannot be read */ public BufferedImage getOpaqueImage() throws IOException { return SampledImageReader.getRGBImage(this, null); }
/** * Returns an RGB buffered image containing the opaque image stream without any masks applied. * If this Image XObject is a mask then the buffered image will contain the raw mask. * @return the image without any masks applied * @throws IOException if the image cannot be read */ public BufferedImage getOpaqueImage() throws IOException { return SampledImageReader.getRGBImage(this, null); }
@Override public BufferedImage getImage() throws IOException { return SampledImageReader.getRGBImage(this, getColorKeyMask()); }
BufferedImage image = SampledImageReader.getRGBImage(this, getColorKeyMask());
BufferedImage image = SampledImageReader.getRGBImage(this, region, subsampling, getColorKeyMask());