Package javax.imageio.stream

Examples of javax.imageio.stream.MemoryCacheImageInputStream$StreamDisposerRecord


  private IIOMetadata getEXIFMetadata(final byte[] bytes) throws IOException {
    Iterator<ImageReader> readers = ImageIO.getImageReadersByFormatName(ImageType.TIFF.name().toLowerCase());
    if (readers.hasNext()) {
      ImageReader reader = readers.next();
      ImageInputStream wrapper = new MemoryCacheImageInputStream(new ByteArrayInputStream(bytes, JAIExifReader.SEEK_BYTES, bytes.length - JAIExifReader.SEEK_BYTES));
      reader.setInput(wrapper, true, false);

      IIOMetadata metadata = reader.getImageMetadata(0);

      reader.dispose();
View Full Code Here


     */
    private BufferedImage load(final String filename)
    {
      try
      {
        final BufferedImage loadedImage = ImageIO.read(new MemoryCacheImageInputStream(
          KittenCaptchaPanel.class.getResourceAsStream(filename + ".png")));
        final BufferedImage image = new BufferedImage(loadedImage.getWidth(),
          loadedImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
        final Graphics2D graphics = image.createGraphics();
        graphics.drawImage(loadedImage, 0, 0, null);
View Full Code Here

   */
  private static BufferedImage load(final String filename)
  {
    try
    {
      return ImageIO.read(new MemoryCacheImageInputStream(
        KittenCaptchaPanel.class.getResourceAsStream(filename)));
    }
    catch (IOException e)
    {
      e.printStackTrace();
View Full Code Here

   */
  private static BufferedImage load(final String filename)
  {
    try
    {
      return ImageIO.read(new MemoryCacheImageInputStream(
        KittenCaptchaPanel.class.getResourceAsStream(filename)));
    }
    catch (IOException e)
    {
      e.printStackTrace();
View Full Code Here

     */
    private BufferedImage load(final String filename)
    {
      try
      {
        final BufferedImage loadedImage = ImageIO.read(new MemoryCacheImageInputStream(
          KittenCaptchaPanel.class.getResourceAsStream(filename + ".png")));
        final BufferedImage image = new BufferedImage(loadedImage.getWidth(),
          loadedImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
        final Graphics2D graphics = image.createGraphics();
        graphics.drawImage(loadedImage, 0, 0, null);
View Full Code Here

   */
  private static BufferedImage load(final String filename)
  {
    try
    {
      return ImageIO.read(new MemoryCacheImageInputStream(
        KittenCaptchaPanel.class.getResourceAsStream(filename)));
    }
    catch (IOException e)
    {
      LOG.error("Error loading image", e);
View Full Code Here

     */
    private BufferedImage load(final String filename)
    {
      try
      {
        final BufferedImage loadedImage = ImageIO.read(new MemoryCacheImageInputStream(
          KittenCaptchaPanel.class.getResourceAsStream(filename + ".png")));
        final BufferedImage image = new BufferedImage(loadedImage.getWidth(),
          loadedImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
        final Graphics2D graphics = image.createGraphics();
        graphics.drawImage(loadedImage, 0, 0, null);
View Full Code Here

   */
  private static BufferedImage load(final String filename)
  {
    try
    {
      return ImageIO.read(new MemoryCacheImageInputStream(
        KittenCaptchaPanel.class.getResourceAsStream(filename)));
    }
    catch (IOException e)
    {
      e.printStackTrace();
View Full Code Here

     */
    private BufferedImage load(final String filename)
    {
      try
      {
        final BufferedImage loadedImage = ImageIO.read(new MemoryCacheImageInputStream(
          KittenCaptchaPanel.class.getResourceAsStream(filename + ".png")));
        final BufferedImage image = new BufferedImage(loadedImage.getWidth(),
          loadedImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
        final Graphics2D graphics = image.createGraphics();
        graphics.drawImage(loadedImage, 0, 0, null);
View Full Code Here

            };

            input = new SequenceInputStream(new ByteArrayInputStream(fakeEmptyExif), input);

            try {
                MemoryCacheImageInputStream stream = new MemoryCacheImageInputStream(input);

                try {
                    return readJPEGThumbnail(reader, stream);
                }
                finally {
                    stream.close();
                }
            }
            finally {
                input.close();
            }
View Full Code Here

TOP

Related Classes of javax.imageio.stream.MemoryCacheImageInputStream$StreamDisposerRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.