From d2d798d0f11abcbf141db69869e76e8d123ec1eb Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 13 Dec 2014 20:28:24 +0000 Subject: FreeImage updated to 3.16 git-svn-id: http://svn.miranda-ng.org/main/trunk@11379 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AdvaImg/src/LibJPEG/jpegtran.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'plugins/AdvaImg/src/LibJPEG/jpegtran.c') diff --git a/plugins/AdvaImg/src/LibJPEG/jpegtran.c b/plugins/AdvaImg/src/LibJPEG/jpegtran.c index c15664a4f4..f3175aee24 100644 --- a/plugins/AdvaImg/src/LibJPEG/jpegtran.c +++ b/plugins/AdvaImg/src/LibJPEG/jpegtran.c @@ -1,7 +1,7 @@ /* * jpegtran.c * - * Copyright (C) 1995-2012, Thomas G. Lane, Guido Vollbeding. + * Copyright (C) 1995-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. * @@ -66,8 +66,8 @@ usage (void) fprintf(stderr, "Switches for modifying the image:\n"); #if TRANSFORMS_SUPPORTED fprintf(stderr, " -crop WxH+X+Y Crop to a rectangular subarea\n"); - fprintf(stderr, " -grayscale Reduce to grayscale (omit color data)\n"); fprintf(stderr, " -flip [horizontal|vertical] Mirror image (left-right or top-bottom)\n"); + fprintf(stderr, " -grayscale Reduce to grayscale (omit color data)\n"); fprintf(stderr, " -perfect Fail if there is non-transformable edge blocks\n"); fprintf(stderr, " -rotate [90|180|270] Rotate image (degrees clockwise)\n"); #endif @@ -76,6 +76,7 @@ usage (void) fprintf(stderr, " -transpose Transpose image\n"); fprintf(stderr, " -transverse Transverse transpose image\n"); fprintf(stderr, " -trim Drop non-transformable edge blocks\n"); + fprintf(stderr, " -wipe WxH+X+Y Wipe (gray out) a rectangular subarea\n"); #endif fprintf(stderr, "Switches for advanced users:\n"); #ifdef C_ARITH_CODING_SUPPORTED @@ -187,7 +188,8 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv, #if TRANSFORMS_SUPPORTED if (++argn >= argc) /* advance to next argument */ usage(); - if (! jtransform_parse_crop_spec(&transformoption, argv[argn])) { + if (transformoption.crop /* reject multiple crop/wipe requests */ || + ! jtransform_parse_crop_spec(&transformoption, argv[argn])) { fprintf(stderr, "%s: bogus -crop argument '%s'\n", progname, argv[argn]); exit(EXIT_FAILURE); @@ -336,6 +338,21 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv, /* Trim off any partial edge MCUs that the transform can't handle. */ transformoption.trim = TRUE; + } else if (keymatch(arg, "wipe", 1)) { +#if TRANSFORMS_SUPPORTED + if (++argn >= argc) /* advance to next argument */ + usage(); + if (transformoption.crop /* reject multiple crop/wipe requests */ || + ! jtransform_parse_crop_spec(&transformoption, argv[argn])) { + fprintf(stderr, "%s: bogus -wipe argument '%s'\n", + progname, argv[argn]); + exit(EXIT_FAILURE); + } + select_transform(JXFORM_WIPE); +#else + select_transform(JXFORM_NONE); /* force an error */ +#endif + } else { usage(); /* bogus switch */ } -- cgit v1.2.3