TurboJPEG: Add "copy none", progressive xform opts
Allow progressive entropy coding to be enabled on a transform-by-transform basis, and implement a new transform option for disabling the copying of markers. Closes #153
This commit is contained in:
@@ -103,21 +103,21 @@ public class TJTransform extends Rectangle {
|
||||
* partial MCU blocks that cannot be transformed will be left in place, which
|
||||
* will create odd-looking strips on the right or bottom edge of the image.
|
||||
*/
|
||||
public static final int OPT_PERFECT = 1;
|
||||
public static final int OPT_PERFECT = 1;
|
||||
/**
|
||||
* This option will discard any partial MCU blocks that cannot be
|
||||
* transformed.
|
||||
*/
|
||||
public static final int OPT_TRIM = 2;
|
||||
public static final int OPT_TRIM = 2;
|
||||
/**
|
||||
* This option will enable lossless cropping.
|
||||
*/
|
||||
public static final int OPT_CROP = 4;
|
||||
public static final int OPT_CROP = 4;
|
||||
/**
|
||||
* This option will discard the color data in the input image and produce
|
||||
* a grayscale output image.
|
||||
*/
|
||||
public static final int OPT_GRAY = 8;
|
||||
public static final int OPT_GRAY = 8;
|
||||
/**
|
||||
* This option will prevent {@link TJTransformer#transform
|
||||
* TJTransformer.transform()} from outputting a JPEG image for this
|
||||
@@ -125,7 +125,21 @@ public class TJTransform extends Rectangle {
|
||||
* filter to capture the transformed DCT coefficients without transcoding
|
||||
* them.
|
||||
*/
|
||||
public static final int OPT_NOOUTPUT = 16;
|
||||
public static final int OPT_NOOUTPUT = 16;
|
||||
/**
|
||||
* This option will enable progressive entropy coding in the output image
|
||||
* generated by this particular transform. Progressive entropy coding will
|
||||
* generally improve compression relative to baseline entropy coding (the
|
||||
* default), but it will reduce compression and decompression performance
|
||||
* considerably.
|
||||
*/
|
||||
public static final int OPT_PROGRESSIVE = 32;
|
||||
/**
|
||||
* This option will prevent {@link TJTransformer#transform
|
||||
* TJTransformer.transform()} from copying any extra markers (including EXIF
|
||||
* and ICC profile data) from the source image to the output image.
|
||||
*/
|
||||
public static final int OPT_COPYNONE = 64;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user