
A small command line utility for converting and resizing image files. 32 and 64-bit versions available, for Windows and Linux.
Download
Description
ImgConvert is a small command line utility for converting and resizing image files. 32 and 64-bit versions available, for Windows and Linux.
This program was made for my private use, but it may also be useful to someone.
Usage
ImgConvert version 1.0 BETA [Windows 64-bit] (2017.12.29)
Usage: imgconvert.exe InputFile(s) [-o FILE] [-f EXT] [-od DIR] [-r[=X]] [-op STR] [-os STR] [-sld] [-slf] [-fs] [-lf[=FILE]] [-lfm MODE] [-pngcl X] [-bmprle=[y|n|auto]] [-jpgq X] [-jpgp] [-rs VAL] [-rsf FLT] [-if FMT] [-cc X] [-b X] [-c X] [-g X] [-gr X] [-gg X] [-gb X] [-cr X] [-cg X] [-cb X] [-ca X] [-gs] [-ic] [-fv] [-fh] [rt X] [-i] [-h] [-V] [--home] [-- InputFile(s)]
Mandatory arguments to long options are mandatory for short options too.
Options are case-sensitive. Values are case insensitive.
Options and values enclosed in square brackets are optional.
Options and input files can be placed in any order, but -- (double dash) indicates the end of parsing options and all subsequent parameters are treated as filenames.
--------------------------------------------------------------------------------
If the option value is a negative number, you must use the "=" sign.
For example, to set the contrast to -10 you must use: -c=-10, NOT a -c -10
--------------------------------------------------------------------------------
Input/output options
| Switch | Description |
|---|---|
| -o, --output-file=FILE | Output file name. If not specified, the name of the input file will be used. |
| -f, --format=EXT | Output file format (extension without dot): JPG, PNG, BMP, GIF, JP2 (except Win64 version), DDS, JNG, MNG, PGM, PPM, PFM, PSD, TGA, XPM |
| -od, --output-dir=DIR | Output directory. If not specified, the directory with the source file will be used. |
| -ov, --overwrite | Overwrite existing files. If you do not specify the -ov switch and the target file already exists, the program will create a new file with a numeric suffix. |
| -r, --recurse=[X] | Recurse subdirectories to X directory (default 100). |
| -op, --output-prefix=STR | Output file(s) prefix. |
| -os, --output-suffix=STR | Output file(s) suffix. |
| -sld, --dir-symlink | Accept symbolic links to directories when searching for files. |
| -slf, --file-symlink | Accept symbolic links to files when searching for files. |
| -fs, --force-save | Forces the saving of the target file, even if no operation has been performed on the source image. |
| -pngcl, --png-compression-level=X |
PNG compression level. Integer in range 0..9 (0 - no compression, 9 - best compression). |
| -bmprle, --bitmap-RLE=[y|n|auto] | Use RLE compression in bitmaps. y - use RLE, n - dont use RLE, auto - detect best option. Default: auto |
| -jpgq, --jpeg-quality=X | JPEG quality. Integer in range 1..100 (1 - the worst, 100 - best qaulity) |
| -jpgp, --jpeg-progressive | Create progressive JPEG files. |
| -lf, --log-file=[FILE] | Log file name. Default imgconvert.log |
| -lfm, --log-mode=MODE | Logging mode: Append, Overwrite. Default: Overwrite |
Image manipulation
| Switch | Description |
|---|---|
| -rs, --resize=VAL | Resize image. Resize value can be given in a form: WxH, W, W%, 0xH, 0xH%. See description below. |
| -rsf, --resize-filter=FLT | Resize filter. Available filters: Nearest, Bilinear, Bicubic, Lanczos. Default: Lanczos. |
| -if, --image-format=FMT | Output image format. Available formats: Gray8, Gray8A, Gray16, Gray16A, Index8, RGB24, RGBA32, RGB48, RGBA64. See description below. |
| -cc, --color-count=X | Reduces the number of colors in the image to X colors. Integer in range 2..4096 |
| -b, --brightness=X | X - brightness value. Float number in range -100..100 (0 - no change, X<0 - darker image, X>0 - brighter). |
| -c, --contrast=X | X - contrast value. Float number in range -100..100 (0 - no change, X<0 - less contrast, X>0 - greater contrast). |
| -g, --gamma=X | Gamma correction value for all color channels. Float number in range 0.01..50 (1 - no change). |
| -gr, --gamma-red=X | Gamma correction value for the red color channel. Float number in range 0.01..50 (1 - no change). |
| -gg, --gamma-green=X | Gamma correction value for the green color channel. Float number in range 0.01..50 (1 - no change). |
| -gb, --gamma-blue=X | Gamma correction value for the blue color channel. Float number in range 0.01..50 (1 - no change). |
| -cr, --channel-red=X | Sets the value of the red channel of each pixel in the image. Integer in range 0..255. |
| -cg, --channel-green=X | Sets the value of the green channel of each pixel in the image. Integer in range 0..255. |
| -cb, --channel-blue=X | Sets the value of the blue channel of each pixel in the image. Integer in range 0..255. |
| -ca, --channel-alpha=X | Sets the value of the alpha channel of the image. Integer in range 0..255 (0 - fully transparent, 255 - opaque). |
| -gs, --grayscale | Convert colors to grayscale. |
| -ic, --invert-colors | Invert colors. |
| -fv, --flip-vertical | Flip image vertically (around the horizontal axis). |
| -fh, --flip-horizontal | Flip image horizontally (around the vertical axis). |
| -rt, --rotate=X | Rotate the image by an angle of X in a clockwise direction (float number) |
Information
| Switch | Description |
|---|---|
| -i, --info | Show technical information about the input file. |
| -h, --help | Show this help. |
| -V, --version | Show application version. |
| --home | Opens the program homepage in the default browser, where you can find more detailed information. |
Resize values
W and H must be positive integers, optionally terminated by the % sign.
WxH- The size of the image will be W pixels (width) per H pixels (height).0xH- The width of the image will be calculated automatically maintaining the original proportions.Wx0- The height of the image will be calculated automatically maintaining the original proportions.W- As above.W%- The width of the image will be W percent of the width of the source image. The height of the image will be calculated automatically maintaining the original proportions.0xH%- The height of the image will be H percent of the height of the source image. The width of the image will be calculated automatically maintaining the original proportions.W%xH%- The width of the image will be W percent of the width of the source image. The height of the image will be H percent of the height of the source image.
Image formats
Gray8- 8-bit grayscaleGray8A- A8Gray8: 8-bit grayscale + alpha channel (16 bits)Gray16- 16-bit grayscaleGray16A- A16Gray16: 16-bit grayscale + alpha channel (32 bits)Index8- 8-bit paletteRGB24- R8G8B8: 24-bit RGBRGBA32- A8R8G8B8: 24-bit RGB + alpha channel (32 bits)RGB48- R16G16B16: 48-bit RGBRGBA64- A16R16G16B16: 48-bit RGB + alpha channel
How to uninstall?
End User License Agreement
Changelog
Version 1.0 BETA (2017.12.29)
Initial release.
