summaryrefslogtreecommitdiff
path: root/src/cgg.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2016-09-11 14:03:13 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2016-09-11 14:03:13 +0200
commit6a16a08ea3e75a524cb136f4c6ada1e4eef4bfd4 (patch)
treed8e2df15d5ffb61cb3b2a69d73f61597c742256b /src/cgg.c
parent2a2356513da7a39d68cd5e3d0e3898022de17061 (diff)
downloadcataract-6a16a08ea3e75a524cb136f4c6ada1e4eef4bfd4.tar.xz
generators: Optionally warn when an image is being resized
This adds commandline argument --debug-warn-resize that is useful for debugging image resizing, particularly for detecting unintended supplied image resizes.
Diffstat (limited to 'src/cgg.c')
-rw-r--r--src/cgg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cgg.c b/src/cgg.c
index e13ffbb..146c687 100644
--- a/src/cgg.c
+++ b/src/cgg.c
@@ -44,6 +44,7 @@ static gboolean verbose = FALSE;
static gboolean update = FALSE;
static gboolean fullsize = FALSE;
static gboolean dont_strip_unused_tags = FALSE;
+static gboolean warn_resize = FALSE;
static int jobs = 0;
@@ -69,6 +70,7 @@ parse_cmd (int argc, char *argv[])
{ "update", 'u', 0, G_OPTION_ARG_NONE, &update, "Update the output structure", NULL },
{ "fullsize", 'f', 0, G_OPTION_ARG_NONE, &fullsize, "Override the nofullsize switch and generate full gallery", NULL },
{ "debug-dont-strip-unused-tags", 0, 0, G_OPTION_ARG_NONE, &dont_strip_unused_tags, "Don't strip unused/unknown template tags", NULL },
+ { "debug-warn-resize", 0, 0, G_OPTION_ARG_NONE, &warn_resize, "Warn when image is being resized", NULL },
{ NULL }
};
@@ -217,6 +219,7 @@ main (int argc, char* argv[])
setup->update_mode = update;
setup->override_nofullsize = fullsize;
setup->strip_unused_tags = ! dont_strip_unused_tags;
+ setup->warn_resize = warn_resize;
path_info = g_malloc0 (sizeof (TPathInfo));
path_info->templates_root = templates_basedir;