OPTIPNG(1) General Commands Manual OPTIPNG(1) NAME OptiPNG − Optimize Portable Network Graphics files SYNOPSIS optipng [−? | −h | −help] optipng [options...] files... DESCRIPTION The OptiPNG program shall attempt to optimize PNG files, i.e. reduce their size to a minimum, without losing semantic information. In addition, this program shall perform a suite of auxiliary functions like integrity checks, metadata recovery and pixmap-to-PNG conversion. The optimization attempts are not guaranteed to succeed. Valid PNG files that cannot be optimized by this program are normally left intact; their size will not grow. The user may request to override this default behavior. FILES The input files are raster image files encoded either in PNG format (the native format), or in an external for- mat. The currently supported external formats are GIF, BMP, PNM and TIFF. OptiPNG processes each image file given in the command line as follows: − If the image is in PNG format: Attempts to optimize the given file in-place. If optimization is successful, or if the option −force is enabled, replaces the original file with its optimized version. The original file is backed up if the option −keep is enabled. − If the image is in an external format: Creates an optimized PNG version of the given file. The output file name is composed from the original file name and the .png extension. Existing files are not overwritten, unless the option −clobber is enabled. OPTIONS General options −?, −h, −help Show a complete summary of options. −backup, −keep Keep a backup of the modified files. −clobber Overwrite the existing output and backup files. Under this option, if the option −backup is not enabled, the old backups of the overwritten files are deleted. −dir directory Write the output files to directory. −fix Enable error recovery. This option has no effect on valid input files. The program will spend a reasonable amount of effort to recover as much data as possible, without increasing the output file size, but the success cannot be generally guaranteed. The program may even increase the file size, e.g., by reconstructing missing critical data. Under this option, integrity shall take precedence over file size. When this option is not used, the invalid input files are left unprocessed. −force Enforce writing of a new output file. This option overrides the program’s decision not to write such file, e.g. when the PNG input is OptiPNG version 0.7.7 2017-Dec-27 1 OPTIPNG(1) General Commands Manual OPTIPNG(1) digitally signed (using dSIG), or when the PNG output becomes larger than the PNG input. −log file Log messages to file. For safety reasons, file must have the extension .log. This option is deprecated and will be removed eventually. Use shell redirection. −out file Write output file to file. The command line must contain exactly one input file. −preserve Preserve file attributes (time stamps, file access rights, etc.) where applicable. −quiet, −silent Run in quiet mode. The messages are still written to the log file if the option −log is enabled. −simulate Run in simulation mode: perform the trials, but do not create output files. −v Enable the options −verbose and −version. −verbose Run in verbose mode. −version Show copyright, version and build info. −− Stop option switch parsing. PNG encoding and optimization options −o level Select the optimization level. The optimization level 0 enables a set of optimization operations that require minimal effort. There will be no changes to image attributes like bit depth or color type, and no recompression of exist- ing IDAT datastreams. The optimization level 1 enables a single IDAT compression trial. The trial chosen is what OptiPNG thinks it’s probably the most effective. The optimization levels 2 and higher enable multiple IDAT compression trials; the higher the level, the more trials. The behavior and the default value of this option may change across different program versions. Use the option −h to see the details pertaining to your specific version. −f filters Select the PNG delta filters. The filters argument is specified as a rangeset (e.g. −f0−5), and the default filters value depends on the optimization level set by the option −o. The filter values 0, 1, 2, 3 and 4 indicate static filtering, and correspond to the standard PNG filter codes (None, Left, Up, Average and Paeth, respectively). The filter value 5 indicates adaptive filter- ing, whose effect is defined by the libpng(3) library used by OptiPNG. −full Produce a full report on IDAT. This option might slow down the trials. −i type Select the interlace type (0−1). If the interlace type 0 is selected, the output image shall be non-interlaced (i.e. progressive- scanned). If the interlace type 1 is selected, the output image shall be interlaced using the Adam7 method. By default, the output shall have the same interlace type as the input. −nb Do not apply bit depth reduction. −nc Do not apply color type reduction. −np Do not apply palette reduction. OptiPNG version 0.7.7 2017-Dec-27 2