summaryrefslogtreecommitdiff
path: root/plugins/AdvaImg/src/LibJPEG/transupp.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AdvaImg/src/LibJPEG/transupp.h')
-rw-r--r--plugins/AdvaImg/src/LibJPEG/transupp.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/plugins/AdvaImg/src/LibJPEG/transupp.h b/plugins/AdvaImg/src/LibJPEG/transupp.h
index 6e4d65afbe..28a1a9cb7a 100644
--- a/plugins/AdvaImg/src/LibJPEG/transupp.h
+++ b/plugins/AdvaImg/src/LibJPEG/transupp.h
@@ -1,7 +1,7 @@
/*
* transupp.h
*
- * Copyright (C) 1997-2011, Thomas G. Lane, Guido Vollbeding.
+ * Copyright (C) 1997-2013, Thomas G. Lane, Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -51,14 +51,17 @@
*
* We also offer a lossless-crop option, which discards data outside a given
* image region but losslessly preserves what is inside. Like the rotate and
- * flip transforms, lossless crop is restricted by the JPEG format: the upper
- * left corner of the selected region must fall on an iMCU boundary. If this
- * does not hold for the given crop parameters, we silently move the upper left
- * corner up and/or left to make it so, simultaneously increasing the region
- * dimensions to keep the lower right crop corner unchanged. (Thus, the
+ * flip transforms, lossless crop is restricted by the current JPEG format: the
+ * upper left corner of the selected region must fall on an iMCU boundary. If
+ * this does not hold for the given crop parameters, we silently move the upper
+ * left corner up and/or left to make it so, simultaneously increasing the
+ * region dimensions to keep the lower right crop corner unchanged. (Thus, the
* output image covers at least the requested region, but may cover more.)
* The adjustment of the region dimensions may be optionally disabled.
*
+ * A complementary lossless-wipe option is provided to discard (gray out) data
+ * inside a given image region while losslessly preserving what is outside.
+ *
* We also provide a lossless-resize option, which is kind of a lossless-crop
* operation in the DCT coefficient block domain - it discards higher-order
* coefficients and losslessly preserves lower-order coefficients of a
@@ -102,7 +105,8 @@ typedef enum {
JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */
JXFORM_ROT_90, /* 90-degree clockwise rotation */
JXFORM_ROT_180, /* 180-degree rotation */
- JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */
+ JXFORM_ROT_270, /* 270-degree clockwise (or 90 ccw) */
+ JXFORM_WIPE /* wipe */
} JXFORM_CODE;
/*
@@ -130,7 +134,7 @@ typedef struct {
boolean perfect; /* if TRUE, fail if partial MCUs are requested */
boolean trim; /* if TRUE, trim partial MCUs as needed */
boolean force_grayscale; /* if TRUE, convert color image to grayscale */
- boolean crop; /* if TRUE, crop source image */
+ boolean crop; /* if TRUE, crop or wipe source image */
/* Crop parameters: application need not set these unless crop is TRUE.
* These can be filled in by jtransform_parse_crop_spec().
@@ -151,6 +155,8 @@ typedef struct {
JDIMENSION output_height;
JDIMENSION x_crop_offset; /* destination crop offsets measured in iMCUs */
JDIMENSION y_crop_offset;
+ JDIMENSION drop_width; /* drop/wipe dimensions measured in iMCUs */
+ JDIMENSION drop_height;
int iMCU_sample_width; /* destination iMCU size */
int iMCU_sample_height;
} jpeg_transform_info;