Package com.drew.tools
Class ExtractJpegSegmentTool
java.lang.Object
com.drew.tools.ExtractJpegSegmentTool
Extracts JPEG segments and writes them to individual files.
Extracting only the required segment(s) for use in unit testing has several benefits:
- Helps reduce the repository size. For example a small JPEG image may still be 20kB+ in size, yet its APPD (IPTC) segment may be as small as 200 bytes.
- Makes unit tests run more rapidly.
- Partially anonymises user-contributed data by removing image portions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprivate static voidstatic voidsaveSegmentFiles(String jpegFilePath, JpegSegmentData segmentData)
-
Constructor Details
-
ExtractJpegSegmentTool
public ExtractJpegSegmentTool()
-
-
Method Details
-
main
- Throws:
IOExceptionJpegProcessingException
-
saveSegmentFiles
public static void saveSegmentFiles(String jpegFilePath, JpegSegmentData segmentData) throws IOException - Throws:
IOException
-
printUsage
private static void printUsage()
-