moji

moji

image magick cheat sheet

install from source on linux

Be sure that you have uninstalled ImageMagic versions preinstalled with your system as they are mostly old:

˜ sudo apt remove imagemagick-6-common imagemagick

You then need some dependencies to download and compile ImageMagick, which you can download by the given command:

˜ sudo apt install build-essential make git libjpeg62-dev libtiff-dev

Once you’re done with dependencies, you can proceed to the further part that involves downloading ImageMagick from Git.

˜ git clone https://github.com/ImageMagick/ImageMagick.git

And change your working directory to ImageMagick:

˜ cd ImageMagick

Our first step toward any compilation should be the configuration of the source code. It may seem complex, but it’s just a one-word command:

˜ ./configure

Now, it’s time to use make the command to build what we’ve configured previously. If all of this seems out of the world, we have a detailed guide on how to install and uninstall packages from source code.

˜ make

Now, let’s install those compiled files by the given command:

˜ sudo make install

After the installation process, let’s configure the run-time dynamic linking of ImageMagick:

˜ sudo ldconfig /usr/local/lib

So which version of ImageMagick, you’d get after going through this long process? Well, let me show you the installed version of ImageMagick after going through this process.

˜ convert -version

fonts for annotations

check the availabe fonts with

˜ convert -list type # for IM older than v6.3.5-7 ˜ convert -list font # for newer versions

screenshot

take a screenshot:

˜ import

a crosshair will appear, then clcikc on the window to be shot.

resize image

resize image to 800px width and keeping aspecr ratio

˜ magick dragon_sm.gif -resize 800 resize_dragon.gif

dithering

some dithering examples to monochromatic images

˜ magick [yourImageName] -monochrome monochrome.gif ˜ magick [yourImageName] -remap pattern:gray50 monochrome.gif ˜ magick [yourImageName] -colorspace Gray -channel All -random-threshold 0x100% random.gif ˜ magick [yourImageName] -colorspace Gray -ordered-dither o4x4 order.gif ˜ magick [yourImageName] -colorspace Gray -ordered-dither h8x8o digit.gif ˜ magick [yourImageName] -dither FloydSteinberg -remap pattern:gray50 fs.gif

but you can go much mdeepoer and crazyer:

ImageMagick docs

convert to amiga ilbm iff

the format to convert to is ilbm but before you can do so you need to reduce the colors to 32 or so with

˜ ppmquant 32 file.pbm > file_reduced.pbm

ppmquant is parte of the netpbm package. you need to dasve you file to a pbm or ppm format to use ppmquant. now you can convert to ilbm using imagemagick

˜ convert file.ppm file.ilbm

thereafter you can rename to to .iff and opeen the file in dpaint od whatever you want to do with it.