aboutsummaryrefslogtreecommitdiffstats
path: root/jpegtools.c
diff options
context:
space:
mode:
authorStéphane Aulery <saulery@free.fr>2014-10-24 01:42:35 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-10-27 13:37:19 +0100
commit19bd17fa608f782c23b1ac50987e741d85668d5b (patch)
tree97e06950ba7c7c736024bf121c87e1bfecdfefe4 /jpegtools.c
parent7c306c30d8e620759d236cb3bc13c90a6c57ca23 (diff)
downloadfbida-19bd17fa608f782c23b1ac50987e741d85668d5b.tar.gz
Trimming pictures by default
By default, crop images with unconventional dimensions. Adds an option (-np) to disable this behavior. Signed-off-by: Stéphane Aulery <saulery@free.fr> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'jpegtools.c')
-rw-r--r--jpegtools.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/jpegtools.c b/jpegtools.c
index f2c1791..692567e 100644
--- a/jpegtools.c
+++ b/jpegtools.c
@@ -430,7 +430,10 @@ static int do_transform(struct jpeg_decompress_struct *src,
memset(&transformoption,0,sizeof(transformoption));
transformoption.transform = transform;
- transformoption.trim = FALSE;
+ if (!(flags & JFLAG_TRANSFORM_TRIM))
+ transformoption.trim = TRUE;
+ else
+ transformoption.trim = FALSE;
transformoption.force_grayscale = FALSE;
/* Any space needed by a transform option must be requested before