logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

econvert - image converter of the ExactImage toolkit

Authors

JakubWilk <jwilk@debian.org>
           Wrote this manual page for the Debian system.

       https://exactcode.com/opensource/exactimage/
           This manual page incorporates texts found on the ExactImage homepage.

Description

       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.

Examples

Basics
       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

   LosslesstransformationsofJPEGfiles
       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.

   Thumbnailsofbi-levelimages
       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

   FasterJPEGdown-scaling
       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

   WorkingwithdigitalcameraRAWdata
       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 ...

   Loadingarbitraryrawdata
       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 ...

Name

       econvert - image converter of the ExactImage toolkit

Options

Input/output-ifile, --inputfile
           Read image from the specified file. Optionally, filenames can be prefixed with format name, e.g.
           jpg:- or raw:rgb8-dump.

       -ofile, --outputfile
           Save output image to the specified file. Optionally, filenames can be prefixed with format name, e.g.
           jpg:- or raw:rgb8-dump.

       -afile, --appendfile
           Append output image to the specified file. Existing image must have the same width as the appended
           one. Optionally, filenames can be prefixed with format name, e.g.  jpg:- or raw:rgb8-dump.

       --compressmethod
           Use the specified compression method for writing images, e.g.  G3, G4, Zip, ... The default depends
           on the output format.

       --decompressmethod
           Use the specified decompression method for reading images.

       --qualityn
           Use the specified quality used for writing compressed images. Valid values are integers from 0 to
           100. The default is 75.

       --resolutionxdpi[ydpi]
           Set metadata resolution.

       --sizewidthheight
           Set image dimensions for raw images.

       --splitfile...
           Split the image in Y-direction into multiple images.

   Scaling,cropping,transformations--bicubic-scalex
           Scale image data with bi-cubic filter. Use scale factor x.

       --bilinear-scalex
           Scale image data with bi-linear filter. Use scale factor x.

       --box-scalex
           (Down)scale image data with box filter. Use scale factor x.

       --ddt-scalex
           Scale image data with data dependent triangulation. Use scale factor x.

       --nearest-scalex
           Scale image data to nearest neighbour. Use scale factor x.

       --scalex
           Scale image data using a method suitable for specified factor x.

       --thumbnailx
           Quick and dirty down-scale for a thumbnail. Use scale factor x.

       --cropxywh
           Crop the specified area out of the image.

       --fast-auto-crop
           Fast auto crop.

       --flip
           Flip the image vertically.

       --flop
           Flip the image horizontally.

       --rotaten
           Rotate the image n degrees.

   Colors--brightnessx
           Change the image brightness.

       --contrastx
           Change the image contrast.

       --saturationx
           Change the image saturation.

       --lightnessx
           Change the image lightness.

       --huex
           Change the image hue.

       --negate
           Negate the image.

       --gammax
           Change the image gamma.

       --normalize
           Transform the image to span the full color range.

       --colorspacecolorspace
           Convert image colorspace. Valid values are: BW, BILEVEL, GRAY, GRAY1, GRAY2, GRAY4, RGB, YUV and
           CYMK.

       --floyd-steinbergn
           Perform Floyd-Steinberg dithering using n shades.

       --riemersman
           Perform Riemersma dithering using n shades.

   Filters--blurstdev
           Perform gaussian blur with standard deviation stdev.

       --deinterlace
           Shuffle every 2nd line.

       --edge
           Detect edges.

       --convolvex11x12...x1n...xn1xn2...xnn
           Convolve the image using the specified convolution matrix.

   Drawing--foregroundcolor
           Set foreground color.

       --backgroundcolor
           Set background color.

       --fontfont
           Use the specified font for drawing text.

       --text-rotationn
           Use the specified text rotation.

       --textx1y1heighttext
           Draw text.

       --stroke-widthn
           Set stroke width for vector primitives.

       --linex1y1x2y2
           Draw a line.

   Help-h, --help
           Display help text and exit.

See Also

exactimage(7)

Synopsis

econvert [option...] [{-i | --input} input-file...] [{-o | --output} output-file...]

       econvert {-h | --help}

See Also