Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/libjpeg/cdaltui.txt @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 IJG JPEG LIBRARY: ALTERNATE USER INTERFACE FOR CJPEG/DJPEG | |
| 2 | |
| 3 Copyright (C) 2020-2023, Guido Vollbeding. | |
| 4 This file is part of the Independent JPEG Group's software. | |
| 5 For conditions of distribution and use, see the accompanying README file. | |
| 6 | |
| 7 | |
| 8 There is an alternate command-line user interface for the IJG JPEG software. | |
| 9 It is designed for use under MS-DOS, and may also be useful on other non-Unix | |
| 10 operating systems. (For that matter, this code works fine on Unix, but the | |
| 11 standard command-line syntax is better on Unix because it is pipe-friendly.) | |
| 12 | |
| 13 With this user interface, cjpeg and djpeg accept multiple input file names | |
| 14 on the command line; output file names are generated by substituting | |
| 15 appropriate extensions. The user is prompted before any already-existing | |
| 16 file will be overwritten. | |
| 17 | |
| 18 Expansion of wild-card file specifications is useful but is not directly | |
| 19 provided by this code. Most DOS C compilers have the ability to do wild-card | |
| 20 expansion "behind the scenes", and we rely on that feature. On other systems, | |
| 21 the shell may do it for you, as is done on Unix. | |
| 22 | |
| 23 Also, a DOS-specific routine is provided to determine available memory; | |
| 24 this makes the -maxmemory switch unnecessary except in unusual cases. | |
| 25 If you know how to determine available memory on a different system, | |
| 26 you can easily add the necessary code. (And please send it along | |
| 27 to jpeg-info@ijg.org so we can include it in future releases!) | |
| 28 | |
| 29 | |
| 30 INSTALLATION | |
| 31 ============ | |
| 32 | |
| 33 Rename the standard cjpeg.c file to cjpegstd.c, then rename cjpegalt.c to | |
| 34 cjpeg.c. | |
| 35 Rename the standard djpeg.c file to djpegstd.c, then rename djpegalt.c to | |
| 36 djpeg.c. | |
| 37 Then build the software as described in install.txt, with these exceptions: | |
| 38 | |
| 39 * Define PROGRESS_REPORT in jconfig.h if you want the percent-done display. | |
| 40 * Define NO_OVERWRITE_CHECK if you *don't* want overwrite confirmation. | |
| 41 * You may ignore the USE_SETMODE and TWO_FILE_COMMANDLINE symbols discussed | |
| 42 in install.txt; these files do not use them. | |
| 43 * As given, djpegalt.c defaults to BMP output (not PPM output as in the | |
| 44 standard djpeg.c). If you want something different, modify DEFAULT_FMT. | |
| 45 | |
| 46 You may also need to do something special to enable filename wild-card | |
| 47 expansion, assuming your compiler has that capability at all. | |
| 48 | |
| 49 Modify the standard usage.txt file as described below. (If you want to use | |
| 50 the Unix-style manual pages cjpeg.1 and djpeg.1, better fix them too.) | |
| 51 | |
| 52 To restore the standard user interface: | |
| 53 Rename cjpeg.c to cjpegalt.c, then rename cjpegstd.c to cjpeg.c. | |
| 54 Rename djpeg.c to djpegalt.c, then rename djpegstd.c to djpeg.c. | |
| 55 Then recompile/rebuild. | |
| 56 | |
| 57 | |
| 58 Here are some specific notes for popular MS-DOS compilers: | |
| 59 | |
| 60 Borland C: | |
| 61 Add "-DMSDOS" to CFLAGS to enable use of the DOS memory determination code. | |
| 62 Link with the standard library file WILDARGS.OBJ to get wild-card expansion. | |
| 63 | |
| 64 Microsoft C: | |
| 65 Add "-DMSDOS" to CFLAGS to enable use of the DOS memory determination code. | |
| 66 Link with the standard library file SETARGV.OBJ to get wild-card expansion. | |
| 67 In the versions I've used, you must also add /NOE to the linker switches to | |
| 68 avoid a duplicate-symbol error from including SETARGV. | |
| 69 | |
| 70 DJGPP (we recommend version 2.0 or later): | |
| 71 Add "-DFREE_MEM_ESTIMATE=0" to CFLAGS. Wild-card expansion is automatic. | |
| 72 | |
| 73 | |
| 74 USAGE | |
| 75 ===== | |
| 76 | |
| 77 Most of the standard usage.txt file also applies to the alternate version, | |
| 78 but replace its "GENERAL USAGE" section with the text below. Edit the text | |
| 79 as necessary if you don't support wildcards or overwrite checking. Be sure | |
| 80 to fix the djpeg switch descriptions if you are not defaulting to PPM output. | |
| 81 Also, if you've provided an accurate memory-estimation procedure, you can | |
| 82 probably eliminate the HINTS related to the -maxmemory switch. | |
| 83 | |
| 84 | |
| 85 GENERAL USAGE | |
| 86 | |
| 87 We provide two programs, cjpeg to compress an image file into JPEG format, | |
| 88 and djpeg to decompress a JPEG file back into a conventional image format. | |
| 89 | |
| 90 The basic command line is: | |
| 91 cjpeg [switches] list of image files | |
| 92 or | |
| 93 djpeg [switches] list of jpeg files | |
| 94 | |
| 95 Each file named is compressed or decompressed. The input file(s) are not | |
| 96 modified; the output data is written to files which have the same names | |
| 97 except for extension. cjpeg always uses ".jpg" for the output file name's | |
| 98 extension; djpeg uses one of ".bmp", ".gif", ".ppm", ".rle", or ".tga", | |
| 99 depending on what output format is selected by the switches. | |
| 100 | |
| 101 For example, to convert xxx.bmp to xxx.jpg and yyy.ppm to yyy.jpg, say: | |
| 102 cjpeg xxx.bmp yyy.ppm | |
| 103 | |
| 104 On most systems you can use standard wildcards to specify the list of input | |
| 105 files; for example, on DOS "djpeg *.jpg" decompresses all the JPEG files in | |
| 106 the current directory. | |
| 107 | |
| 108 If an intended output file already exists, you'll be asked whether or not to | |
| 109 overwrite it. If you say no, the program skips that input file and goes on | |
| 110 to the next one. | |
| 111 | |
| 112 You can intermix switches and file names; for example | |
| 113 djpeg -gif file1.jpg -targa file2.jpg | |
| 114 decompresses file1.jpg into GIF format (file1.gif) and file2.jpg into Targa | |
| 115 format (file2.tga). Only switches to the left of a given file name affect | |
| 116 processing of that file; when there are conflicting switches, the rightmost | |
| 117 one takes precedence. | |
| 118 | |
| 119 You can override the program's choice of output file name by using the | |
| 120 -outfile switch, as in | |
| 121 cjpeg -outfile output.jpg input.ppm | |
| 122 -outfile only affects the first input file name to its right. | |
| 123 | |
| 124 The currently supported image file formats are: PPM (PBMPLUS color format), | |
| 125 PGM (PBMPLUS grayscale format), BMP, GIF, Targa, and RLE (Utah Raster Toolkit | |
| 126 format). (RLE is supported only if the URT library is available, which it | |
| 127 isn't on most non-Unix systems.) cjpeg recognizes the input image format | |
| 128 automatically, with the exception of some Targa-format files. You have to | |
| 129 tell djpeg which format to generate. | |
| 130 | |
| 131 JPEG files are in the standard JFIF file format. There are other, | |
| 132 less widely used JPEG-based file formats, but we don't support them. | |
| 133 | |
| 134 All switch names may be abbreviated; for example, -grayscale may be written | |
| 135 -gray or -gr. Most of the "basic" switches can be abbreviated to as little as | |
| 136 one letter. Upper and lower case are equivalent (-BMP is the same as -bmp). | |
| 137 British spellings are also accepted (e.g., -greyscale), though for brevity | |
| 138 these are not mentioned below. |
