Imagemagick
Updated: September 28, 2024
Can be used to adjust images. Typically used to shrink image sizes for web use.
Table of Contents
SUBCOMMANDS
magick # used for resize, blur, crop, flip etc replaced magick when it dep
-resize # resize image
-strip # strip all metadata from image
identify # get stats on image
-list format # list formats available
-verbose # get even more info
mogrify # same as magick but write over original image
composite # overlaps one image over another
montage # images are tiled with option of border, frame, etc
compare # mathmatically and visually compare diff of images
stream # line by line print for large images
display # display image or sequence on any X server
import # saves any visible window on an X server. Capture various screenshots
conjure # interprete and execute scripts written in Magick Scripting Language (MSL)
EXAMPLES
# convert all images in a directory
magick *.jpeg *.png
# resize image
magick image.jpg -resize 1024x768\! output_file.jpg
# reduce quality
magick image.jpg -quality 75 output_file.jpg
Ico
.ico is used for web icons but caters to many sizes.
useful for when svg does not work.
# create the pngs to be placed in the .ico
magick favicon.svg -resize 16x16 -strip favicon-16x16.png
magick favicon.svg -resize 32x32 -strip favicon-32x32.png
magick favicon.svg -resize 48x48 -strip favicon-48x48.png
magick favicon.svg -resize 64x64 -strip favicon-64x64.png
# place the pngs into the .ico file
magick favicon-16x16.png favicon-32x32.png favicon-48x48.png favicon-64x64.png favicon.ico
# check that the sizes are in the .ico
identify favicon.ico