Package com.drew.tools
Class ExtractJpegSegmentTool
- java.lang.Object
-
- com.drew.tools.ExtractJpegSegmentTool
-
public class ExtractJpegSegmentTool extends java.lang.ObjectExtracts 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 Constructor Description ExtractJpegSegmentTool()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)private static voidprintUsage()static voidsaveSegmentFiles(java.lang.String jpegFilePath, JpegSegmentData segmentData)
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOException, JpegProcessingException- Throws:
java.io.IOExceptionJpegProcessingException
-
saveSegmentFiles
public static void saveSegmentFiles(java.lang.String jpegFilePath, JpegSegmentData segmentData) throws java.io.IOException- Throws:
java.io.IOException
-
printUsage
private static void printUsage()
-
-