ECONVERT(1) | ExactImage Manual | ECONVERT(1) |
econvert - image converter of the ExactImage toolkit
econvert [option...] [{-i | --input} input-file...] [{-o | --output} output-file...]
econvert {-h | --help}
ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements.
econvert is a command line frontend for the image processing library and mimics ImageMagick's convert. However econvert syntax is not compatible with convert.
-i file, --input file
-o file, --output file
-a file, --append file
--compress method
--decompress method
--quality n
--resolution xdpi [ydpi]
--size width height
--split file...
--bicubic-scale x
--bilinear-scale x
--box-scale x
--ddt-scale x
--nearest-scale x
--scale x
--thumbnail x
--crop x y w h
--fast-auto-crop
--flip
--flop
--rotate n
--brightness x
--contrast x
--saturation x
--lightness x
--hue x
--negate
--gamma x
--normalize
--colorspace colorspace
--floyd-steinberg n
--riemersma n
--blur stdev
--deinterlace
--edge
--convolve x11 x12 ... x1n ... xn1 xn2 ... xnn
--foreground color
--background color
--font font
--text-rotation n
--text x1 y1 height text
--stroke-width n
--line x1 y1 x2 y2
-h, --help
Image data must be read using -i or --input, processing routines are selected by their name with two leading dashes (e.g. --rotate) and at any point the data might be written into a file with -o or --output, for example:
econvert -i lenea.tiff --box-scale 0.5 -o medium.png --box-scale 0.5 -o little.png
The library delays image decoding as much as possible and provides lossless algorithms to work on compressed data (such as JPEGs) directly:
econvert -i AV220-Scan.JPG --resolution 300x300 -o 1.jpg --rotate 90 -o 2.jpg --rotate 180 -o 3.jpg --rotate -90 -o 4.jpg --flip -o 5.jpg --flop -o 6.jpg --scale 0.25 -o thumb.jpg
In this example 1.jpg will be created from the original JPEG DCT coefficients, those coefficients will be rearranged and 2.jpg, 3.jpg, 4.jpg, 5.jpg and 6.jpg will be written without any additional loss in quality. Only at the end, for image thumb.jpg, the DCT will actually be decoded — but due to the accelerated JPEG scaling only partially.
When 1 bit, black and white, images are scaled down, the output often looks bad, as the library algorithms always operate in the color-space the image data is stored in. To work around this problem, the colorspace must be changed (e.g. to 8 bit gray) before applying the box scaler. At the end the result might be converted back to just a few shades of gray such as 2 or 4 bit:
econvert -i avision-bw-scan.pbm --colorspace gray8 --box-scale 0.125 --colorspace gray2 -o thumb.png
If you don't care about quality, only about throughput, you can force nearest neighbor scaling by just specifying a scale factor the JPEG decoder can accelerate (½, ¼, or 1/8) and apply the remaining scaling manually. To achieve faster scaling with the effective factor 1/3:
econvert -i big.jpg --scale .5 --nearest-scale 0.66 -o thumb.jpg
Wide range of digital camera RAW formats is supported. Usually decoding of RAW data should be transparent and automatic, however some formats also are also valid TIFF files and the embedded thumbnail might be picked by in favour of the actual RAW content. This this cases the dcraw decoder can explicitly be requested with the decoder prefix of the input parameter:
econvert -i dcraw:img_0123.cr2 ...
To quickly extract the embedded thumbnail preview, specify thumb as decompression method before the image is loaded:
econvert --decompress thumb -i dcraw:img_0123.cr2 ...
It is possible to load arbitrary raw data via the raw: codec specification; color-depth (colorspace) and size for the raw data have to be explicitly specified:
econvert --size 1696x32 --colorspace rgb8 -i raw:data-file ...
Jakub Wilk <jwilk@debian.org>
https://exactcode.com/opensource/exactimage/
This manual page was written for the Debian system (and may be used by others).
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
04/11/2010 | econvert |