summaryrefslogtreecommitdiff
path: root/src/setup.h
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2016-09-18 19:34:56 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2016-09-18 19:54:08 +0200
commitaeefd1959aad3b80a0fe02083edbd5ebfb09510b (patch)
tree4da69339f39f55c3a70e7f54a4eafe95ea9fd972 /src/setup.h
parent6b853ad4312763d50f1e843d4e7168ccd023530a (diff)
downloadcataract-aeefd1959aad3b80a0fe02083edbd5ebfb09510b.tar.xz
Introduce resizing thresholds
This commit brings deeper changes to the image sizes concept. The goal was to allow more flexible input in resizing vs. supplied files mixed mode. Instead of hard <noresize> flags the decision whether to resize or copy an image is now based on threshold. While not 100% universal, it brings more control regarding image size bounds. Also brings a level of tolerance for specific errors (off-by-one exports). Image sizes' rules are a bit simpler, hopefully easier to understand. A lot can be achieved by combination of thresholds.
Diffstat (limited to 'src/setup.h')
-rw-r--r--src/setup.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/setup.h b/src/setup.h
index faf02f6..54b89b2 100644
--- a/src/setup.h
+++ b/src/setup.h
@@ -27,6 +27,10 @@ G_BEGIN_DECLS
#define THUMBNAIL_NAME_FORMAT "%.3d_%s"
#define TARGET_IMAGE_DIR_PREFIX "_"
+#define DEFAULT_NO_RESIZE_THRESHOLD 1
+#define DEFAULT_AVAILABILITY_THRESHOLD 1
+#define DEFAULT_QUALITY_THRESHOLD 5
+
#define SETUP_XML "setup.xml"
#define SETUP_V2_XML "setup2.xml"
#define SETUP_NATIVE_VERSION 200 /* 2.0 */
@@ -104,8 +108,10 @@ typedef struct {
int crop_width;
int crop_height;
int quality;
- gboolean no_resize;
gchar *fallback_size;
+ int no_resize_threshold;
+ int availability_threshold;
+ int quality_threshold;
TCropStyle thumb_crop_style;
} TImageSize;