Package org.apache.sanselan.common.byteSources

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


   */
  public void updateExifMetadataLossy(File src, OutputStream os,
      TiffOutputSet outputSet) throws ImageReadException, IOException,
      ImageWriteException
  {
    ByteSource byteSource = new ByteSourceFile(src);
    updateExifMetadataLossy(byteSource, os, outputSet);
  }
View Full Code Here


      boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
      if (ignoreImageData)
        continue;

      ByteSource byteSource = new ByteSourceFile(imageFile);
      Debug.debug("Source Segments:");
      new JpegUtils().dumpJFIF(byteSource);

      {
        JpegImageMetadata metadata = (JpegImageMetadata) Sanselan
View Full Code Here

      boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
      if (ignoreImageData)
        continue;

      ByteSource byteSource = new ByteSourceFile(imageFile);
      Debug.debug("Source Segments:");
      new JpegUtils().dumpJFIF(byteSource);

      JpegImageMetadata originalMetadata = (JpegImageMetadata) Sanselan
          .getMetadata(imageFile);
      assertNotNull(originalMetadata);

      TiffImageMetadata oldExifMetadata = originalMetadata.getExif();
      assertNotNull(oldExifMetadata);

      ByteSource stripped;
      {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        new ExifRewriter().removeExifMetadata(byteSource, baos);
        byte bytes[] = baos.toByteArray();
        File tempFile = File.createTempFile("removed", ".jpg");
View Full Code Here

        boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
        if (ignoreImageData)
          continue;

        ByteSource byteSource = new ByteSourceFile(imageFile);
        Debug.debug("Source Segments:");
        new JpegUtils().dumpJFIF(byteSource);

        JpegImageMetadata oldMetadata = (JpegImageMetadata) Sanselan
            .getMetadata(imageFile);
View Full Code Here

      File imageFile = (File) images.get(i);
      Debug.debug("imageFile", imageFile);
      Debug.debug();

      ByteSource byteSource = new ByteSourceFile(imageFile);
      Debug.debug("Segments:");
      new JpegUtils().dumpJFIF(byteSource);

      Map params = new HashMap();
      boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
View Full Code Here

    //    Debug.debug("possible file", file);

    try
    {
      ByteSource byteSource = new ByteSourceFile(file);
      return new JpegImageParser().hasExifSegment(byteSource);
    }
    catch (Exception e)
    {
      //      Debug.debug("Error file", file.getAbsoluteFile());
View Full Code Here

   * @see java.io.OutputStream
   */
  public void removeExifMetadata(File src, OutputStream os)
      throws ImageReadException, IOException, ImageWriteException
  {
    ByteSource byteSource = new ByteSourceFile(src);
    removeExifMetadata(byteSource, os);
  }
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

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

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

TOP

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

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.