Print the library version and exit whenever -version is passed to cjpeg, djpeg, or jpegtran.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1421 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -32,6 +32,9 @@ for such images are ignored by the decompressor. However, the TurboJPEG API
|
||||
was being too rigid and was expecting the sampling factors to be equal to 1
|
||||
before it treated the image as a grayscale JPEG.
|
||||
|
||||
[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)
|
||||
==================
|
||||
|
||||
5
cjpeg.1
5
cjpeg.1
@@ -1,4 +1,4 @@
|
||||
.TH CJPEG 1 "11 May 2014"
|
||||
.TH CJPEG 1 "21 November 2014"
|
||||
.SH NAME
|
||||
cjpeg \- compress an image file to a JPEG file
|
||||
.SH SYNOPSIS
|
||||
@@ -221,6 +221,9 @@ give more output. Also, version information is printed at startup.
|
||||
.B \-debug
|
||||
Same as
|
||||
.BR \-verbose .
|
||||
.TP
|
||||
.B \-version
|
||||
Print version information and exit.
|
||||
.PP
|
||||
The
|
||||
.B \-restart
|
||||
|
||||
9
cjpeg.c
9
cjpeg.c
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
* Modified 2003-2011 by Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2010, 2013, D. R. Commander.
|
||||
* Copyright (C) 2010, 2013-2014, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains a command-line user interface for the JPEG compressor.
|
||||
@@ -192,6 +192,7 @@ usage (void)
|
||||
fprintf(stderr, " -memdst Compress to memory instead of file (useful for benchmarking)\n");
|
||||
#endif
|
||||
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, " -baseline Force baseline quantization tables\n");
|
||||
fprintf(stderr, " -qtables file Use quantization tables given in file\n");
|
||||
@@ -289,8 +290,14 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
JVERSION);
|
||||
printed_version = TRUE;
|
||||
}
|
||||
|
||||
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, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
|
||||
/* Force a monochrome JPEG file to be generated. */
|
||||
jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
|
||||
|
||||
5
djpeg.1
5
djpeg.1
@@ -1,4 +1,4 @@
|
||||
.TH DJPEG 1 "11 May 2014"
|
||||
.TH DJPEG 1 "21 November 2014"
|
||||
.SH NAME
|
||||
djpeg \- decompress a JPEG file to an image file
|
||||
.SH SYNOPSIS
|
||||
@@ -202,6 +202,9 @@ give more output. Also, version information is printed at startup.
|
||||
.B \-debug
|
||||
Same as
|
||||
.BR \-verbose .
|
||||
.TP
|
||||
.B \-version
|
||||
Print version information and exit.
|
||||
.SH EXAMPLES
|
||||
.LP
|
||||
This example decompresses the JPEG file foo.jpg, quantizes it to
|
||||
|
||||
6
djpeg.c
6
djpeg.c
@@ -165,6 +165,7 @@ usage (void)
|
||||
#endif
|
||||
|
||||
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
||||
fprintf(stderr, " -version Print version information and exit\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -261,6 +262,11 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||
}
|
||||
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)) {
|
||||
/* Select recommended processing options for quick-and-dirty output. */
|
||||
cinfo->two_pass_quantize = FALSE;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH JPEGTRAN 1 "1 January 2013"
|
||||
.TH JPEGTRAN 1 "21 November 2014"
|
||||
.SH NAME
|
||||
jpegtran \- lossless transformation of JPEG files
|
||||
.SH SYNOPSIS
|
||||
@@ -214,6 +214,9 @@ give more output. Also, version information is printed at startup.
|
||||
.B \-debug
|
||||
Same as
|
||||
.BR \-verbose .
|
||||
.TP
|
||||
.B \-version
|
||||
Print version information and exit.
|
||||
.SH EXAMPLES
|
||||
.LP
|
||||
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:
|
||||
* Copyright (C) 1995-2010, Thomas G. Lane, Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2010, D. R. Commander.
|
||||
* Copyright (C) 2010, 2014, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains a command-line user interface for JPEG transcoding.
|
||||
@@ -86,6 +86,7 @@ usage (void)
|
||||
fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
|
||||
fprintf(stderr, " -outfile name Specify name for output file\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");
|
||||
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||
fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n");
|
||||
@@ -212,6 +213,11 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
}
|
||||
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)) {
|
||||
/* Mirror left-right or top-bottom. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
|
||||
Reference in New Issue
Block a user