Class JpegXmpRewriter


  • public class JpegXmpRewriter
    extends JpegRewriter
    Interface for Exif write/update/remove functionality for Jpeg/JFIF images.
    • Constructor Detail

      • JpegXmpRewriter

        public JpegXmpRewriter()
    • Method Detail

      • removeXmpXml

        public void removeXmpXml​(File src,
                                 OutputStream os)
                          throws ImageReadException,
                                 IOException
        Reads a Jpeg image, removes all XMP XML (by removing the APP1 segment), and writes the result to a stream.

        Parameters:
        src - Image file.
        os - OutputStream to write the image to.
        Throws:
        ImageReadException - if it fails to read the JFIF segments
        IOException - if it fails to read or write the data from the segments
        See Also:
        File, OutputStream
      • removeXmpXml

        public void removeXmpXml​(byte[] src,
                                 OutputStream os)
                          throws ImageReadException,
                                 IOException
        Reads a Jpeg image, removes all XMP XML (by removing the APP1 segment), and writes the result to a stream.

        Parameters:
        src - Byte array containing Jpeg image data.
        os - OutputStream to write the image to.
        Throws:
        ImageReadException - if it fails to read the JFIF segments
        IOException - if it fails to read or write the data from the segments
      • removeXmpXml

        public void removeXmpXml​(InputStream src,
                                 OutputStream os)
                          throws ImageReadException,
                                 IOException
        Reads a Jpeg image, removes all XMP XML (by removing the APP1 segment), and writes the result to a stream.

        Parameters:
        src - InputStream containing Jpeg image data.
        os - OutputStream to write the image to.
        Throws:
        ImageReadException - if it fails to read the JFIF segments
        IOException - if it fails to read or write the data from the segments
      • removeXmpXml

        public void removeXmpXml​(ByteSource byteSource,
                                 OutputStream os)
                          throws ImageReadException,
                                 IOException
        Reads a Jpeg image, removes all XMP XML (by removing the APP1 segment), and writes the result to a stream.

        Parameters:
        byteSource - ByteSource containing Jpeg image data.
        os - OutputStream to write the image to.
        Throws:
        ImageReadException - if it fails to read the JFIF segments
        IOException - if it fails to read or write the data from the segments