org.apache.sanselan.formats.jpeg.xmp
Class JpegRewriter
java.lang.Object
org.apache.sanselan.common.BinaryFileFunctions
org.apache.sanselan.common.BinaryFileParser
org.apache.sanselan.formats.jpeg.xmp.JpegRewriter
- All Implemented Interfaces:
- BinaryConstants, JpegConstants
- Direct Known Subclasses:
- JpegIptcRewriter, JpegXmpRewriter
public class JpegRewriter
- extends BinaryFileParser
- implements JpegConstants
Interface for Exif write/update/remove functionality for Jpeg/JFIF images.
See the source of the XmpXmlUpdateExample class for example usage.
- See Also:
org.apache.sanselan.sampleUsage.WriteXmpXmlExample
Fields inherited from interface org.apache.sanselan.formats.jpeg.JpegConstants |
CONST_8BIM, EOI, EXIF_IDENTIFIER_CODE, icc_profile_label, JFIF0_SIGNATURE, JFIF0_SIGNATURE_ALTERNATIVE, JFIFMarker, JPEG_APP0, JPEG_APP0_Marker, JPEG_APP1_Marker, JPEG_APP13_Marker, JPEG_APP14_Marker, JPEG_APP15_Marker, JPEG_APP2_Marker, MARKERS, MAX_SEGMENT_SIZE, PHOTOSHOP_IDENTIFICATION_STRING, SOF0Marker, SOF10Marker, SOF11Marker, SOF12Marker, SOF13Marker, SOF14Marker, SOF15Marker, SOF1Marker, SOF2Marker, SOF3Marker, SOF4Marker, SOF5Marker, SOF6Marker, SOF7Marker, SOF8Marker, SOF9Marker, SOI, SOS_Marker, XMP_IDENTIFIER |
Methods inherited from class org.apache.sanselan.common.BinaryFileParser |
byteArrayHasPrefix, convertByteArrayToInt, convertByteArrayToInt, convertByteArrayToShort, convertByteArrayToShort, getByteOrder, int2ToByteArray, read2Bytes, read3Bytes, read4Bytes, setByteOrder, setByteOrder |
Methods inherited from class org.apache.sanselan.common.BinaryFileFunctions |
CharsToQuad, compareByteArrays, compareByteArrays, compareBytes, compareBytes, convertByteArrayToDouble, convertByteArrayToDouble, convertByteArrayToDoubleArray, convertByteArrayToFloat, convertByteArrayToFloat, convertByteArrayToFloatArray, convertByteArrayToInt, convertByteArrayToInt, convertByteArrayToIntArray, convertByteArrayToRational, convertByteArrayToRational, convertByteArrayToRationalArray, convertByteArrayToShort, convertByteArrayToShort, convertByteArrayToShortArray, convertDoubleArrayToByteArray, convertDoubleToByteArray, convertFloatArrayToByteArray, convertFloatToByteArray, convertIntArrayToByteArray, convertIntArrayToRationalArray, convertRationalArrayToByteArray, convertRationalToByteArray, convertShortArrayToByteArray, convertShortToByteArray, copyStreamToStream, debugByteArray, debugNumber, debugNumber, debugNumber, debugNumber, debugNumberArray, findNull, findNull, getBytearrayHead, getByteArrayTail, getDebug, getRAFBytes, getStreamBytes, head, int2ToByteArray, printByteBits, printCharQuad, printCharQuad, read2Bytes, read3Bytes, read4Bytes, readAndVerifyBytes, readAndVerifyBytes, readByte, readBytearray, readByteArray, readByteArray, readBytes, readRandomBytes, scanForByte, setDebug, skipBytes, skipBytes, slice, startsWith, tail, writeIntInToByteArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JpegRewriter
public JpegRewriter()
- Constructor. to guess whether a file contains an image based on its file
extension.
analyzeJFIF
protected JpegRewriter.JFIFPieces analyzeJFIF(ByteSource byteSource)
throws ImageReadException,
java.io.IOException
- Throws:
ImageReadException
java.io.IOException
removeXmpSegments
protected java.util.List removeXmpSegments(java.util.List segments)
removePhotoshopApp13Segments
protected java.util.List removePhotoshopApp13Segments(java.util.List segments)
findPhotoshopApp13Segments
protected java.util.List findPhotoshopApp13Segments(java.util.List segments)
removeExifSegments
protected java.util.List removeExifSegments(java.util.List segments)
filterSegments
protected java.util.List filterSegments(java.util.List segments,
org.apache.sanselan.formats.jpeg.xmp.JpegRewriter.SegmentFilter filter)
filterSegments
protected java.util.List filterSegments(java.util.List segments,
org.apache.sanselan.formats.jpeg.xmp.JpegRewriter.SegmentFilter filter,
boolean reverse)
insertBeforeFirstAppSegments
protected java.util.List insertBeforeFirstAppSegments(java.util.List segments,
java.util.List newSegments)
throws ImageWriteException
- Throws:
ImageWriteException
insertAfterLastAppSegments
protected java.util.List insertAfterLastAppSegments(java.util.List segments,
java.util.List newSegments)
throws ImageWriteException
- Throws:
ImageWriteException
writeSegments
protected void writeSegments(java.io.OutputStream os,
java.util.List segments)
throws ImageWriteException,
java.io.IOException
- Throws:
ImageWriteException
java.io.IOException
Copyright © 2007-2009. All Rights Reserved.