Package org.apache.sanselan.common.byteSources

Examples of org.apache.sanselan.common.byteSources.ByteSourceArray


    return result;
  }

  public final ArrayList getAllBufferedImages(byte bytes[])
      throws ImageReadException, IOException {
    return getAllBufferedImages(new ByteSourceArray(bytes));
  }
View Full Code Here


  public abstract BufferedImage getBufferedImage(ByteSource byteSource,
      Map params) throws ImageReadException, IOException;

  public final BufferedImage getBufferedImage(byte bytes[], Map params)
      throws ImageReadException, IOException {
    return getBufferedImage(new ByteSourceArray(bytes), params);
  }
View Full Code Here

    return getImageSize(bytes, null);
  }

  public final Dimension getImageSize(byte bytes[], Map params)
      throws ImageReadException, IOException {
    return getImageSize(new ByteSourceArray(bytes), params);
  }
View Full Code Here

    return getICCProfileBytes(bytes, null);
  }

  public final byte[] getICCProfileBytes(byte bytes[], Map params)
      throws ImageReadException, IOException {
    return getICCProfileBytes(new ByteSourceArray(bytes), params);
  }
View Full Code Here

  public abstract byte[] getICCProfileBytes(ByteSource byteSource, Map params)
      throws ImageReadException, IOException;

  public final String dumpImageFile(byte bytes[]) throws ImageReadException,
      IOException {
    return dumpImageFile(new ByteSourceArray(bytes));
  }
View Full Code Here

        Debug.debug("tempFile", tempFile);
        tempFile.deleteOnExit();
        IOUtils.writeToFile(bytes, tempFile);

        Debug.debug("Output Segments:");
        new JpegUtils().dumpJFIF(new ByteSourceArray(bytes));

        assertTrue(!hasExifData(tempFile));
      }
    }
  }
View Full Code Here

        Debug.debug("tempFile", tempFile);
        tempFile.deleteOnExit();
        IOUtils.writeToFile(bytes, tempFile);

        Debug.debug("Output Segments:");
        stripped = new ByteSourceArray(bytes);
        new JpegUtils().dumpJFIF(stripped);

        assertTrue(!hasExifData(tempFile));
      }

      {
        TiffOutputSet outputSet = oldExifMetadata.getOutputSet();
        //      outputSet.dump();

        ByteArrayOutputStream baos = new ByteArrayOutputStream();

        new ExifRewriter().updateExifMetadataLossy(stripped, baos,
            outputSet);

        byte bytes[] = baos.toByteArray();
        File tempFile = File.createTempFile("inserted" + "_", ".jpg");
        Debug.debug("tempFile", tempFile);
        //      tempFile.deleteOnExit();
        IOUtils.writeToFile(bytes, tempFile);

        Debug.debug("Output Segments:");
        new JpegUtils().dumpJFIF(new ByteSourceArray(bytes));

        //        assertTrue(!hasExifData(tempFile));

        JpegImageMetadata newMetadata = (JpegImageMetadata) Sanselan
            .getMetadata(tempFile);
View Full Code Here

        Debug.debug("tempFile", tempFile);
        //      tempFile.deleteOnExit();
        IOUtils.writeToFile(bytes, tempFile);

        Debug.debug("Output Segments:");
        new JpegUtils().dumpJFIF(new ByteSourceArray(bytes));

        //        assertTrue(!hasExifData(tempFile));

        JpegImageMetadata newMetadata = (JpegImageMetadata) Sanselan
            .getMetadata(tempFile);
View Full Code Here

   * @param  os  OutputStream to write the image to.
   */
  public void removeExifMetadata(byte src[], OutputStream os)
      throws ImageReadException, IOException, ImageWriteException
  {
    ByteSource byteSource = new ByteSourceArray(src);
    removeExifMetadata(byteSource, os);
  }
View Full Code Here

   */
  public void updateExifMetadataLossless(byte src[], OutputStream os,
      TiffOutputSet outputSet) throws ImageReadException, IOException,
      ImageWriteException
  {
    ByteSource byteSource = new ByteSourceArray(src);
    updateExifMetadataLossless(byteSource, os, outputSet);
  }
View Full Code Here

TOP

Related Classes of org.apache.sanselan.common.byteSources.ByteSourceArray

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.