* Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2003-2011 by Guido Vollbeding.
* libjpeg-turbo Modifications:
- * Copyright (C) 2010, 2013-2014, D. R. Commander.
- * For conditions of distribution and use, see the accompanying README file.
+ * Copyright (C) 2010, 2013-2014, 2017, D. R. Commander.
+ * For conditions of distribution and use, see the accompanying README.ijg
+ * file.
*
* This file contains a command-line user interface for the JPEG compressor.
* It should work on any system with Unix- or MS-DOS-style command lines.
LOCAL(cjpeg_source_ptr)
-select_file_type (j_compress_ptr cinfo, FILE * infile)
+select_file_type (j_compress_ptr cinfo, FILE *infile)
{
int c;
*/
-static const char * progname; /* program name for error messages */
-static char * outfilename; /* for -outfile switch */
-boolean memdst; /* for -memdst switch */
+static const char *progname; /* program name for error messages */
+static char *outfilename; /* for -outfile switch */
+boolean memdst; /* for -memdst switch */
LOCAL(void)
#endif
fprintf(stderr, "Switches (names may be abbreviated):\n");
- fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is useful range)\n");
+ fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is most useful range,\n");
+ fprintf(stderr, " default is 75)\n");
fprintf(stderr, " -grayscale Create monochrome JPEG file\n");
fprintf(stderr, " -rgb Create RGB JPEG file\n");
#ifdef ENTROPY_OPT_SUPPORTED
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");
+ fprintf(stderr, " -qtables FILE Use quantization tables given in FILE\n");
fprintf(stderr, " -qslots N[,...] Set component quantization tables\n");
fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n");
#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");
#endif
exit(EXIT_FAILURE);
}
*/
{
int argn;
- char * arg;
+ char *arg;
boolean force_baseline;
boolean simple_progressive;
- char * qualityarg = NULL; /* saves -quality parm if any */
- char * qtablefile = NULL; /* saves -qtables filename if any */
- char * qslotsarg = NULL; /* saves -qslots parm if any */
- char * samplearg = NULL; /* saves -sample parm if any */
- char * scansarg = NULL; /* saves -scans parm if any */
+ char *qualityarg = NULL; /* saves -quality parm if any */
+ char *qtablefile = NULL; /* saves -qtables filename if any */
+ char *qslotsarg = NULL; /* saves -qslots parm if any */
+ char *samplearg = NULL; /* saves -sample parm if any */
+ char *scansarg = NULL; /* saves -scans parm if any */
/* Set up default JPEG parameters. */
#endif
int file_index;
cjpeg_source_ptr src_mgr;
- FILE * input_file;
- FILE * output_file = NULL;
+ FILE *input_file;
+ FILE *output_file = NULL;
unsigned char *outbuffer = NULL;
unsigned long outsize = 0;
JDIMENSION num_scanlines;