Merge tag '2.1.3' into master-moz
* tag '2.1.3': (56 commits) Neon/AArch64: Explicitly unroll quant loop w/Clang Neon/AArch64: Fix/suppress UBSan warnings Neon/AArch64: Accelerate Huffman encoding AppVeyor: Test strict MSVC compiler warnings Eliminate incompatible pointer type warnings MSVC: Eliminate int conversion warnings (C4244) MSVC: Eliminate C4996 warnings in API libs BUILDING.md: Clarify that Ninja works with Windows BUILDING.md: Remove NASM RPM rebuild instructions BUILDING.md: Document NASM/Yasm path variables "YASM" = "Yasm" Build: Fix Neon capability detection w/ MSVC Ensure that strncpy() dest strings are terminated Eliminate unnecessary JFREAD()/JFWRITE() macros Build: Embed version/API/(C) info in MSVC DLLs Fix segv w/ h2v2 merged upsamp, jpeg_crop_scanline TJBench: Remove innocuous always-true condition GitHub Actions: Specify Catalina for macOS build Fix -Wpedantic compiler warnings Eliminate non-ANSI C compatibility macros ...
This commit is contained in:
11
jpegtran.c
11
jpegtran.c
@@ -4,7 +4,7 @@
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1995-2019, Thomas G. Lane, Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2010, 2014, 2017, 2019-2020, D. R. Commander.
|
||||
* Copyright (C) 2010, 2014, 2017, 2019-2022, D. R. Commander.
|
||||
* mozjpeg Modifications:
|
||||
* Copyright (C) 2014, Mozilla Corporation.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
@@ -15,6 +15,10 @@
|
||||
* provides some lossless and sort-of-lossless transformations of JPEG data.
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
|
||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||
#include "transupp.h" /* Support routines for jpegtran */
|
||||
#include "jversion.h" /* for version message */
|
||||
@@ -68,6 +72,7 @@ usage(void)
|
||||
fprintf(stderr, "Switches (names may be abbreviated):\n");
|
||||
fprintf(stderr, " -copy none Copy no extra markers from source file\n");
|
||||
fprintf(stderr, " -copy comments Copy only comment markers (default)\n");
|
||||
fprintf(stderr, " -copy icc Copy only ICC profile markers\n");
|
||||
fprintf(stderr, " -copy all Copy all extra markers\n");
|
||||
#ifdef ENTROPY_OPT_SUPPORTED
|
||||
fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression, enabled by default)\n");
|
||||
@@ -211,6 +216,8 @@ parse_switches(j_compress_ptr cinfo, int argc, char **argv,
|
||||
copyoption = JCOPYOPT_NONE;
|
||||
} else if (keymatch(argv[argn], "comments", 1)) {
|
||||
copyoption = JCOPYOPT_COMMENTS;
|
||||
} else if (keymatch(argv[argn], "icc", 1)) {
|
||||
copyoption = JCOPYOPT_ICC;
|
||||
} else if (keymatch(argv[argn], "all", 1)) {
|
||||
copyoption = JCOPYOPT_ALL;
|
||||
} else
|
||||
@@ -607,6 +614,8 @@ main(int argc, char **argv)
|
||||
fclose(icc_file);
|
||||
if (copyoption == JCOPYOPT_ALL)
|
||||
copyoption = JCOPYOPT_ALL_EXCEPT_ICC;
|
||||
if (copyoption == JCOPYOPT_ICC)
|
||||
copyoption = JCOPYOPT_NONE;
|
||||
}
|
||||
|
||||
if (report) {
|
||||
|
||||
Reference in New Issue
Block a user