Class JpegIptcRewriter


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

  • Method Details

    • removeIptc

      public void removeIptc(byte[] src, OutputStream os) throws ImagingException, IOException, ImagingException
      Reads a JPEG image, removes all IPTC data from the App13 segment but leaves the other data in that segment (if present) unchanged and writes the result to a stream.

      Parameters:
      src - Byte array containing JPEG image data.
      os - OutputStream to write the image to.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
    • removeIptc

      public void removeIptc(byte[] src, OutputStream os, boolean removeSegment) throws ImagingException, IOException, ImagingException
      Reads a JPEG image, removes all IPTC data from the App13 segment but leaves the other data in that segment (if present) unchanged (unless removeSegment is true) and writes the result to a stream.

      Parameters:
      src - Byte array containing JPEG image data.
      os - OutputStream to write the image to.
      removeSegment - Remove the App13 segment.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
    • removeIptc

      Reads a JPEG image, removes all IPTC data from the App13 segment but leaves the other data in that segment (if present) unchanged and writes the result to a stream.

      Parameters:
      byteSource - ByteSource containing JPEG image data.
      os - OutputStream to write the image to.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
    • removeIptc

      public void removeIptc(ByteSource byteSource, OutputStream os, boolean removeSegment) throws ImagingException, IOException, ImagingException
      Reads a JPEG image, removes all IPTC data from the App13 segment but leaves the other data in that segment (if present) unchanged (unless removeSegment is true) and writes the result to a stream.

      Parameters:
      byteSource - ByteSource containing JPEG image data.
      os - OutputStream to write the image to.
      removeSegment - Remove the App13 segment.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
    • removeIptc

      Reads a JPEG image, removes all IPTC data from the App13 segment but leaves the other data in that segment (if present) unchanged and writes the result to a stream.

      Parameters:
      src - Image file.
      os - OutputStream to write the image to.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
      See Also:
    • removeIptc

      public void removeIptc(File src, OutputStream os, boolean removeSegment) throws ImagingException, IOException, ImagingException
      Reads a JPEG image, removes all IPTC data from the App13 segment but leaves the other data in that segment (if present) unchanged (unless removeSegment is true) and writes the result to a stream.

      Parameters:
      src - Image file.
      os - OutputStream to write the image to.
      removeSegment - Remove the App13 segment.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
      See Also:
    • removeIptc

      Reads a JPEG image, removes all IPTC data from the App13 segment but leaves the other data in that segment (if present) unchanged and writes the result to a stream.

      Parameters:
      src - InputStream containing JPEG image data.
      os - OutputStream to write the image to.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
    • removeIptc

      public void removeIptc(InputStream src, OutputStream os, boolean removeSegment) throws ImagingException, IOException, ImagingException
      Reads a JPEG image, removes all IPTC data from the App13 segment but leaves the other data in that segment (if present) unchanged (unless removeSegment is true) and writes the result to a stream.

      Parameters:
      src - InputStream containing JPEG image data.
      os - OutputStream to write the image to.
      removeSegment - Remove the App13 segment.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
    • writeIptc

      public void writeIptc(byte[] src, OutputStream os, PhotoshopApp13Data newData) throws ImagingException, IOException, ImagingException
      Reads a JPEG image, replaces the IPTC data in the App13 segment but leaves the other data in that segment (if present) unchanged and writes the result to a stream.
      Parameters:
      src - Byte array containing JPEG image data.
      os - OutputStream to write the image to.
      newData - structure containing IPTC data.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
    • writeIptc

      Reads a JPEG image, replaces the IPTC data in the App13 segment but leaves the other data in that segment (if present) unchanged and writes the result to a stream.
      Parameters:
      byteSource - ByteSource containing JPEG image data.
      os - OutputStream to write the image to.
      newData - structure containing IPTC data.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
    • writeIptc

      Reads a JPEG image, replaces the IPTC data in the App13 segment but leaves the other data in that segment (if present) unchanged and writes the result to a stream.
      Parameters:
      src - Image file.
      os - OutputStream to write the image to.
      newData - structure containing IPTC data.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image
    • writeIptc

      Reads a JPEG image, replaces the IPTC data in the App13 segment but leaves the other data in that segment (if present) unchanged and writes the result to a stream.
      Parameters:
      src - InputStream containing JPEG image data.
      os - OutputStream to write the image to.
      newData - structure containing IPTC data.
      Throws:
      ImagingException - if there are more than one Photoshop App13 segment, or if the Photoshop segment cannot be parsed
      IOException - if it fails to read from the origin byte source, or to write to the target byte source
      ImagingException - if it fails to write the target image