Provided by: exactimage_0.7.4-2ubuntu1_i386
econvert - Image converter of the ExactImage library
econvert [--background] [--bicubic-scale] [--bilinear-scale] [--blur]
[--box-scale] [--brightness] [--colorspace] [--compress] [--contrast]
[--convolve] [--crop] [--ddt-scale] [--decompress] [--deinterlace]
[--deskew] [--edge] [--fast-auto-crop] [--flip] [--flop] [--floyd-
steinberg] [--foreground] [--gamma] [--hue] [-i|--input INPUT]
[--lightness] [--line] [--nearest-scale] [--negate] [--normalize]
[-o|--output OUTPUT] [--quality] [--resolution] [--riemersma]
[--rotate] [--saturation] [--scale] [--size] [--split] [--text]
ExactImage is a fast C++ image processing library. Unlike ImageMagick,
it allows operation in several color spaces and bit depths natively,
resulting in much lower memory and computational requirements. Some
optimized algorithms operate in 1/20 of the time ImageMagick requires,
and displaying large images can be as fast as 1/10 of the time the
"display" program takes.
econvert is a command line frontend for the image processing library
and mimicks Imagemagick’s convert. However since some aspects of the
convert arguments are too limited (e.g. even now we have two
ditherizers to select from) or annoying (colorspace conversion is quite
unintuitive to control with Imagemagick and the data is often blown up
to an more generic colorspace) the econvert syntax never will be 1:1
compatible with convert. Also because those options only start with one
dash (-) ... or are named density rather than resolution and so on.
Background color used for operations.
Scale image data with bi-cubic filter.
Scale image data with bi-linear filter.
(Down)scale image data with box filter.
Change image brightness.
Convert image colorspace (BW, BILEVEL, GRAY, GRAY1, GRAY2, GRAY4,
RGB, YUV, CYMK).
Compression method for writing images (e.g. G3, G4, Zip, ...)
depending on the output format, a reasonable setting by default.
Change image contrast.
Crop an area out of an image: x,y,w,h.
Scale image data with data dependant triangulation.
Decompression method for reading images (e.g. thumb) depending on
the input format, allowing to read partial data.
Shuffleg every 2nd line.
Deskew digitalized paper.
Edge detect filter.
Fast auto crop.
Flip the image vertically.
Flip the image horizontally.
Floyd Steinberg dithering using n shades.
Foreground color used for operations.
Change image gamma.
Change image hue.
Input file or ’-’ for stdin, optionally prefixed with format: e.g:
jpg:- or raw:rgb8-dump.
Change image lightness.
Draw a line: x1, y1, x2, y2.
Scale image data to nearest neighbour.
Negates the image.
Transform the image to span the full color range.
Output file or ’-’ for stdout, optinally prefix with format: e.g.
jpg:- or raw:rgb8-dump.
Quality setting used for writing compressed images integer range
0-100, the default is 75.
Set meta data resolution in dpi to x[xy] e.g. 200 or 200x400.
Riemersma dithering using n shades.
Change image saturation.
Scale image data using a method suitable for specified factor.
Width and height of raw images whose dimensions are unknown.
Filenames to save the images split in Y-direction into n parts.
Draw text: x1, y1, height, text.
Displays help text and exits.
First 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,
$ econvert -i lenea.tiff --box-scale 0.5 -o medium.png --box-scale 0.5
Since version 0.3 the library tries to delay image decoding as much as
possible and provides lossless and accelerated 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
precision (no new JPEG artefacts) and with outstanding speed. Only at
the end, for image thumb.jpg, the DCT will actually be decoded - but
due to the accelerated JPEG scaling only partially! The whole chain of
operations applied to an 8 bit RGB JPEG only takes 0.99s on 2GHz Intel
Thumbnails of black and white (bi-level) images
When 1 bit, black and white, images are scaled down the output often
might look pretty awful. The box scaling algorithm usually does a
pretty good job thumbnailing b/w images, however as the ExactImage
algorithms always operate in the color-space the image data is stored
in 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
Slightly faster JPEG down-scaling
As outlined in the lossless JPEG page, ExactImage is slightly slower
than EPEG, though with noticeable higher output quality. If you do not
care about quality, only about bare thruput (maybe in an web
application?) you can force nearest neighbor scaling by just specifing
a scale factor the JPEG decoder can accellerate (1/2, 1/4, or 1/8) and
apply the remaining scalling manually. To archive a faster scaling with
the effective factor 0.33:
$ econvert -i big.jpg --scale .5 --nearest-scale 0.66 -o thumb.jpg
Working with digital camera RAW data
Digital still camera raw images differ from model to model and are
sometimes even obfuscated to prevent loading by third parties. However,
ExactImage supports a wide range of RAW formats thanks to the embedded
dcraw code (we had to embed a copy of dcraw as the orignal project is
only available as a command line program and not in form of a library -
ExactImage needs to have some more control about how the image data is
passed around, e.g. in memory and not by pipes).
Usually decoding of RAW data should be transparent and automatic,
however some formats also are valid TIFF files and the embedded
thumbnail might be picked by ExactImage’s TIFF support in favour of the
actual RAW content. This this cases the dcraw backend decoder can
explicitly be request with the decoder prefix of the input parameter:
$ econvert -i dcraw:img_0123.cr2 ...
As of version 0.6.5 ExactImage also allows to quickly extract the
embedded thumbnail preview, if any, by specifing "thumb"(nail) as
decompress argument before the image is loaded:
$ econvert --decompress thumb -i dcraw:img_0123.cr2 ...
This usually just takes parts of a second and is useful to generate
previews, galleries, etc.
Loading real raw data
While working on algorithms, dumping frame-buffer content or doing
low-level driver development it often is handy to also load arbitrary
RAW pixel data. Via the "raw:" codec specification this is possible in
econvert. As econvert does use the current color-depth (colorspace) and
size for the raw data they have to be specified before loading the
image like this:
$ econvert --size 1696x32 --colorspace rgb8 -i raw:data-file ...
More information about econvert and the ExactImage project can be found
ExactImage was written by ExactCODE GmbH <http://www.exactcode.de/>.
This manual page was written by Daniel Baumann <firstname.lastname@example.org>, for
the Debian project (but may be used by others).