|
|||||||||||||||||||||||||||||||||||||||||||||||||
# 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 conversionIMMUSE 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] options: -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 namesTo 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.pngTo rotate all photos in-place by EXIF (camera photo orientation):
immuse -r exif *.jpgto avoid overwrite confirmation:
immuse -r exif -a *.jpgthe same as above but with scaling to fit 800x600 pixels size (keeping aspect):
immuse -r exif -x 800 -y 600 -k -a *.jpg *.pngthis will ignore rotation for PNG files, since they will not have exif data.
https://github.com/cade-vs/immuse git clone git://github.com/cade-vs/immuse.git
2018-2021 (c) Vladi Belperchinov-Shabanski "Cade" <[email protected]> <[email protected]> <[email protected]> http://cade.noxrun.com/projects/immuse http://github.com/cade-vs/immuse
Distributed under the GPLv2 license, see COPYING file for the full text. Splash image is: "Be free - CC0" by Darkmoon-Art-de https://www.deviantart.com/darkmoon-art-de/art/Be-free-CC0-873218149 Used under Creative Commons Attribution 3.0 License https://creativecommons.org/licenses/by/3.0/
|
|||||||||||||||||||||||||||||||||||||||||||||||||
|