Merge pull request #123 from dcommander/cjpeg-djpeg-jpegtran-version
Print the library version and exit whenever -version is passed to cjpeg, djpeg, or jpegtran
This commit is contained in:
@@ -13,6 +13,9 @@ instead of -1 if componentID was > 0 and subsamp was TJSAMP_GRAY.
|
|||||||
[3] Fixed an issue in tjBufSizeYUV2() wherby it would erroneously return 0
|
[3] Fixed an issue in tjBufSizeYUV2() wherby it would erroneously return 0
|
||||||
instead of -1 if width was < 1.
|
instead of -1 if width was < 1.
|
||||||
|
|
||||||
|
[8] cjpeg, djpeg, and jpegtran now accept an argument of -version, which will
|
||||||
|
print the library version and exit.
|
||||||
|
|
||||||
|
|
||||||
1.3.90 (1.4 beta1)
|
1.3.90 (1.4 beta1)
|
||||||
==================
|
==================
|
||||||
|
|||||||
5
cjpeg.1
5
cjpeg.1
@@ -1,4 +1,4 @@
|
|||||||
.TH CJPEG 1 "11 May 2014"
|
.TH CJPEG 1 "21 November 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
cjpeg \- compress an image file to a JPEG file
|
cjpeg \- compress an image file to a JPEG file
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -221,6 +221,9 @@ give more output. Also, version information is printed at startup.
|
|||||||
.B \-debug
|
.B \-debug
|
||||||
Same as
|
Same as
|
||||||
.BR \-verbose .
|
.BR \-verbose .
|
||||||
|
.TP
|
||||||
|
.B \-version
|
||||||
|
Print version information and exit.
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.B \-restart
|
.B \-restart
|
||||||
|
|||||||
8
cjpeg.c
8
cjpeg.c
@@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||||
* Modified 2003-2011 by Guido Vollbeding.
|
* Modified 2003-2011 by Guido Vollbeding.
|
||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright (C) 2010, 2013, D. R. Commander.
|
* Copyright (C) 2010, 2013-2014, D. R. Commander.
|
||||||
* mozjpeg Modifications:
|
* mozjpeg Modifications:
|
||||||
* Copyright (C) 2014, Mozilla Corporation.
|
* Copyright (C) 2014, Mozilla Corporation.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* For conditions of distribution and use, see the accompanying README file.
|
||||||
@@ -214,6 +214,7 @@ usage (void)
|
|||||||
fprintf(stderr, " -memdst Compress to memory instead of file (useful for benchmarking)\n");
|
fprintf(stderr, " -memdst Compress to memory instead of file (useful for benchmarking)\n");
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
||||||
|
fprintf(stderr, " -version Print version information and exit\n");
|
||||||
fprintf(stderr, "Switches for wizards:\n");
|
fprintf(stderr, "Switches for wizards:\n");
|
||||||
fprintf(stderr, " -qtables file Use quantization tables given in file\n");
|
fprintf(stderr, " -qtables file Use quantization tables given in file\n");
|
||||||
fprintf(stderr, " -qslots N[,...] Set component quantization tables\n");
|
fprintf(stderr, " -qslots N[,...] Set component quantization tables\n");
|
||||||
@@ -324,6 +325,11 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
}
|
}
|
||||||
cinfo->err->trace_level++;
|
cinfo->err->trace_level++;
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "version", 4)) {
|
||||||
|
fprintf(stderr, "%s version %s (build %s)\n",
|
||||||
|
PACKAGE_NAME, VERSION, BUILD);
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
} else if (keymatch(arg, "fastcrush", 4)) {
|
} else if (keymatch(arg, "fastcrush", 4)) {
|
||||||
jpeg_c_set_bool_param(cinfo, JBOOLEAN_OPTIMIZE_SCANS, FALSE);
|
jpeg_c_set_bool_param(cinfo, JBOOLEAN_OPTIMIZE_SCANS, FALSE);
|
||||||
|
|
||||||
|
|||||||
5
djpeg.1
5
djpeg.1
@@ -1,4 +1,4 @@
|
|||||||
.TH DJPEG 1 "11 May 2014"
|
.TH DJPEG 1 "21 November 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
djpeg \- decompress a JPEG file to an image file
|
djpeg \- decompress a JPEG file to an image file
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -202,6 +202,9 @@ give more output. Also, version information is printed at startup.
|
|||||||
.B \-debug
|
.B \-debug
|
||||||
Same as
|
Same as
|
||||||
.BR \-verbose .
|
.BR \-verbose .
|
||||||
|
.TP
|
||||||
|
.B \-version
|
||||||
|
Print version information and exit.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.LP
|
.LP
|
||||||
This example decompresses the JPEG file foo.jpg, quantizes it to
|
This example decompresses the JPEG file foo.jpg, quantizes it to
|
||||||
|
|||||||
6
djpeg.c
6
djpeg.c
@@ -165,6 +165,7 @@ usage (void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
||||||
|
fprintf(stderr, " -version Print version information and exit\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,6 +262,11 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
}
|
}
|
||||||
cinfo->err->trace_level++;
|
cinfo->err->trace_level++;
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "version", 4)) {
|
||||||
|
fprintf(stderr, "%s version %s (build %s)\n",
|
||||||
|
PACKAGE_NAME, VERSION, BUILD);
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
} else if (keymatch(arg, "fast", 1)) {
|
} else if (keymatch(arg, "fast", 1)) {
|
||||||
/* Select recommended processing options for quick-and-dirty output. */
|
/* Select recommended processing options for quick-and-dirty output. */
|
||||||
cinfo->two_pass_quantize = FALSE;
|
cinfo->two_pass_quantize = FALSE;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.TH JPEGTRAN 1 "1 January 2013"
|
.TH JPEGTRAN 1 "21 November 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
jpegtran \- lossless transformation of JPEG files
|
jpegtran \- lossless transformation of JPEG files
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -214,6 +214,9 @@ give more output. Also, version information is printed at startup.
|
|||||||
.B \-debug
|
.B \-debug
|
||||||
Same as
|
Same as
|
||||||
.BR \-verbose .
|
.BR \-verbose .
|
||||||
|
.TP
|
||||||
|
.B \-version
|
||||||
|
Print version information and exit.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.LP
|
.LP
|
||||||
This example converts a baseline JPEG file to progressive form:
|
This example converts a baseline JPEG file to progressive form:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* This file was part of the Independent JPEG Group's software:
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1995-2010, Thomas G. Lane, Guido Vollbeding.
|
* Copyright (C) 1995-2010, Thomas G. Lane, Guido Vollbeding.
|
||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright (C) 2010, D. R. Commander.
|
* Copyright (C) 2010, 2014, D. R. Commander.
|
||||||
* mozjpeg Modifications:
|
* mozjpeg Modifications:
|
||||||
* Copyright (C) 2014, Mozilla Corporation.
|
* Copyright (C) 2014, Mozilla Corporation.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* For conditions of distribution and use, see the accompanying README file.
|
||||||
@@ -92,6 +92,7 @@ usage (void)
|
|||||||
fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
|
fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
|
||||||
fprintf(stderr, " -outfile name Specify name for output file\n");
|
fprintf(stderr, " -outfile name Specify name for output file\n");
|
||||||
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
||||||
|
fprintf(stderr, " -version Print version information and exit\n");
|
||||||
fprintf(stderr, "Switches for wizards:\n");
|
fprintf(stderr, "Switches for wizards:\n");
|
||||||
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||||
fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n");
|
fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n");
|
||||||
@@ -222,6 +223,11 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
}
|
}
|
||||||
cinfo->err->trace_level++;
|
cinfo->err->trace_level++;
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "version", 4)) {
|
||||||
|
fprintf(stderr, "%s version %s (build %s)\n",
|
||||||
|
PACKAGE_NAME, VERSION, BUILD);
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
} else if (keymatch(arg, "flip", 1)) {
|
} else if (keymatch(arg, "flip", 1)) {
|
||||||
/* Mirror left-right or top-bottom. */
|
/* Mirror left-right or top-bottom. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
|
|||||||
Reference in New Issue
Block a user