Package javax.imageio.stream

Examples of javax.imageio.stream.MemoryCacheImageInputStream$StreamDisposerRecord


                if(tiffReaders != null && tiffReaders.hasNext()) {
                    ImageReader tiffReader = (ImageReader)tiffReaders.next();
                    ByteArrayInputStream bais =
                        new ByteArrayInputStream(exifData);
                    ImageInputStream exifStream =
                        new MemoryCacheImageInputStream(bais);
                    tiffReader.setInput(exifStream);
                    IIOMetadata exifMetadata = tiffReader.getImageMetadata(0);
                    tiffMetadata.mergeTree(metadataName,
                                           exifMetadata.getAsTree(metadataName));
                    tiffReader.reset();
View Full Code Here


                            ImageReader tiffReader =
                                (ImageReader)tiffReaders.next();
                            ByteArrayInputStream bais =
                                new ByteArrayInputStream(exifData);
                            ImageInputStream exifStream =
                                new MemoryCacheImageInputStream(bais);
                            tiffReader.setInput(exifStream);
                            if(tiffReader.getNumImages(true) > 1) {
                                BufferedImage exifThumbnail =
                                    tiffReader.read(1, null);
                                thumbnails.add(exifThumbnail);
View Full Code Here

        // Cache file could not be created.
    }
      }

      if(stream == null) {
    stream = new MemoryCacheImageInputStream(inStream);
      }
  }

  return stream;
    }
View Full Code Here

            byte[] tmpBuf = new byte[bytesPerRow*srcHeight];
            decompressor.decodeRaw(tmpBuf, dstOffset, bitsPerPixel,
                                   bytesPerRow);
            ByteArrayInputStream byteStream =
                new ByteArrayInputStream(tmpBuf);
            stream = new MemoryCacheImageInputStream(byteStream);
        } else {
            stream.seek(offset);
        }
       
        for (int y = srcMinY; y < srcMinY + srcHeight; y += chromaSubsampleV) {
View Full Code Here

    try {
      /*
       * ImageIO uses an SPI pattern API. We don't care about the particulars of
       * the implementation, so just choose the first ImageReader.
       */
      MemoryCacheImageInputStream input = new MemoryCacheImageInputStream(
          imageUrl.openStream());
      Iterator<ImageReader> it = ImageIO.getImageReaders(input);
      readers : while (it.hasNext()) {
        ImageReader reader = it.next();
        reader.setInput(input);
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

  public String getType() {
    return _type;
  }

  private void _setType() {
    MemoryCacheImageInputStream mcis =
      new MemoryCacheImageInputStream(new ByteArrayInputStream(_textObj));

    Iterator itr = ImageIO.getImageReaders(mcis);

    _type = null;
    String fm;
View Full Code Here

                    byte[] tables = JPEGTablesField.getAsBytes();

                    // Create an input stream for the tables.
                    ByteArrayInputStream bais =
                        new ByteArrayInputStream(tables);
                    MemoryCacheImageInputStream iis =
                        new MemoryCacheImageInputStream(bais);

                    // Read the tables stream using the JPEG reader.
                    ImageReader jpegReader = getJPEGTablesReader();
                    jpegReader.setInput(iis);
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.