# rotate and convert all JPEG files to GIF
immuse -r 90 -a -f gif *.jpg
# convert single JPEG file to PNG
immuse -i jpeg file.bin -f png -o file.png
# rescale all JPEG files to 800x600 with compression quality 77
immuse -x 800 -y 600 -q 77 ../*.jpg

# crops and scale middle square part to size 256px, converted to PNG
immuse -z 256 file.jpg -o squared.png


IMMUSE is command-line image conversion and manipulation utility. IMMUSE offers the following image manipulations:

* format conversion (all supported by local Imager installation)
* scaling/resizing
* stretching
* aspect-preservig single dimension scaling/resizing
* flipping, horizontal and vertical
* rotation, CW. CCW and by EXIF information
* grayscale conversion
IMMUSE is designed to work on many files in one run but can be used on single file with optional destination filename change.

IMMUSE is written in Perl and uses Imager perl module.


usage: immuse <options> [input-files]
    -o output-file-name  -- sets output file, works only for single input file
    -f output-format     -- sets output file format (i.e. JPEG, GIF, etc.) 
    -i input-format      -- sets input  file format (i.e. JPEG, GIF, etc.) 
    -x width             -- sets output image width in pixels (keeps aspect!)
    -y height            -- sets output image width in pixels (keeps aspect!)
    -x width%            -- sets output image width in percents (keeps aspect!)
    -y height%           -- sets output image width in percents (keeps aspect!)
    -z size              -- crops and scale middle square part of "size"
    -k                   -- keep aspect when scaling (inside -x -y pixels)
    -h                   -- flip image horizontally 
    -v                   -- flip image vertically   
    -g                   -- convert image to grayscale
    -r degrees           -- rotate by degrees CW, negative for CCW
    -r exif              -- rotate by EXIF info
    -q quality           -- output quality in percents (if applicable)
    -a                   -- always overwrite files (WARNING!)
    -n                   -- never  overwrite files (skip, existing)
    --                   -- end of options, may be followed by image file names
To check which image formats are supported by currenly installed IMMUSE and Imager library:

cade@local:~$ immuse -f list

Supported input  file formats: bmp,gif,ico,jpeg,jpg,png,pnm,raw,sgi,tga,webp
Supported output file formats: bmp,gif,ico,jpeg,jpg,png,pnm,raw,sgi,tga,webp


* "-i list" or "-f list" will list supported file formats
* if both -x and -y specified, aspect will not be kept!
* use "-x nnnn -y 100%" to stretch horizontally
* use "-x 100% -y nnnn" to stretch vertically
* options cannot be grouped: -fd is invalid, correct is: -f -d


To create square PNG thumbnail of an image:

immuse -z 48 be_free_by_darkmoon.jpg -o icon.png
To rotate all photos in-place by EXIF (camera photo orientation):

immuse -r exif *.jpg
to avoid overwrite confirmation:

immuse -r exif -a *.jpg
the same as above but with scaling to fit 800x600 pixels size (keeping aspect):

immuse -r exif -x 800 -y 600 -k -a *.jpg *.png
this will ignore rotation for PNG files, since they will not have exif data.

git clone git://


2018-2021 (c) Vladi Belperchinov-Shabanski "Cade" 

<[email protected]> <[email protected]> <[email protected]>


Distributed under the GPLv2 license, see COPYING file for the full text.
Splash image is: "Be free - CC0" by Darkmoon-Art-de
Used under Creative Commons Attribution 3.0 License

be free cc0 by darkmoon art de sm.jpg 104`402 bytes
Nov 24, 2021
be free cc0 by darkmoon art de sm.txt 1`711 bytes
Nov 24, 2021
COPYING 17`976 bytes
Nov 24, 2021
GIT HISTORY 4`251 bytes
Nov 24, 2021
immuse-2.1-git-snapshot.tar.gz 101`764 bytes
Nov 24, 2021
immuse-2.1.tar.gz 101`764 bytes
Nov 24, 2021
immuse-demo1.png 90`975 bytes
Nov 24, 2021
README 4`350 bytes
Nov 24, 2021