Examples of ExifRewriter


Examples of org.apache.sanselan.formats.jpeg.exifRewrite.ExifRewriter

      //      printTagValue(jpegMetadata, TiffConstants.TIFF_TAG_DATE_TIME);

      os = new FileOutputStream(dst);
      os = new BufferedOutputStream(os);

      new ExifRewriter().updateExifMetadataLossless(jpegImageFile, os,
          outputSet);
    }
    finally
    {
      if (os != null)
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.exifRewrite.ExifRewriter

        //        assertNotNull(metadata.getExif());
      }

      {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        new ExifRewriter().removeExifMetadata(byteSource, baos);
        byte bytes[] = baos.toByteArray();
        File tempFile = File.createTempFile("test", ".jpg");
        Debug.debug("tempFile", tempFile);
        tempFile.deleteOnExit();
        IOUtils.writeToFile(bytes, tempFile);
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.exifRewrite.ExifRewriter

      assertNotNull(oldExifMetadata);

      ByteSource stripped;
      {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        new ExifRewriter().removeExifMetadata(byteSource, baos);
        byte bytes[] = baos.toByteArray();
        File tempFile = File.createTempFile("removed", ".jpg");
        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);
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.exifRewrite.ExifRewriter

    {
      public void rewrite(ByteSource byteSource, OutputStream os,
          TiffOutputSet outputSet) throws ImageReadException,
          IOException, ImageWriteException
      {
        new ExifRewriter().updateExifMetadataLossy(byteSource, os,
            outputSet);
      }
    };

    rewrite(rewriter, "lossy");
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.exifRewrite.ExifRewriter

    {
      public void rewrite(ByteSource byteSource, OutputStream os,
          TiffOutputSet outputSet) throws ImageReadException,
          IOException, ImageWriteException
      {
        new ExifRewriter().updateExifMetadataLossless(byteSource, os,
            outputSet);
      }
    };

    rewrite(rewriter, "lossless");
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.exifRewrite.ExifRewriter

        //        assertNotNull(metadata.getExif());
      }

      {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        new ExifRewriter().removeExifMetadata(byteSource, baos);
        byte bytes[] = baos.toByteArray();
        File tempFile = createTempFile("test", ".jpg");
        Debug.debug("tempFile", tempFile);
        IOUtils.writeToFile(bytes, tempFile);
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.exifRewrite.ExifRewriter

      assertNotNull(oldExifMetadata);

      ByteSource stripped;
      {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        new ExifRewriter().removeExifMetadata(byteSource, baos);
        byte bytes[] = baos.toByteArray();
        File tempFile = createTempFile("removed", ".jpg");
        Debug.debug("tempFile", tempFile);
        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 = createTempFile("inserted" + "_", ".jpg");
        Debug.debug("tempFile", tempFile);
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.exifRewrite.ExifRewriter

    {
      public void rewrite(ByteSource byteSource, OutputStream os,
          TiffOutputSet outputSet) throws ImageReadException,
          IOException, ImageWriteException
      {
        new ExifRewriter().updateExifMetadataLossy(byteSource, os,
            outputSet);
      }
    };

    rewrite(rewriter, "lossy");
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.exifRewrite.ExifRewriter

    {
      public void rewrite(ByteSource byteSource, OutputStream os,
          TiffOutputSet outputSet) throws ImageReadException,
          IOException, ImageWriteException
      {
        new ExifRewriter().updateExifMetadataLossless(byteSource, os,
            outputSet);
      }
    };

    rewrite(rewriter, "lossless");
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.exifRewrite.ExifRewriter

    try
    {
      os = new FileOutputStream(dst);
      os = new BufferedOutputStream(os);

      new ExifRewriter().removeExifMetadata(jpegImageFile, os);
    } finally
    {
      if (os != null)
        try
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.