ImageMagick and OpenEXR
I could not get OpenEXR delegate to work in ImageMagick. There was no reason for it in config.log. It just silently refused to get configured. I debugged the configure script and found out that PKG _CONFIG was unset. So this fixed it. The—enable-hdri should be optional.
1 ./configure PKG_CONFIG=/usr/bin/pkg-config --prefix=/usr/local/stow/imagemagick --enable-hdri
Installing ImageMagick from sources and using xstow to handle the installation.
I really hate installing software outside of the package manager, because that is not the way of a stable system. Xstow helps the agony those times that sourceball installations are necessary (e.g for new features). Here’s how to install imagemagick with xstow. If you haven’t installed xstow yet, then follow the relevant instructions in this snippet
1 sudo apt-get install libmagick9-dev # needed for sane image support 2 cd /tmp 3 wget ftp://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/ImageMagick-6.4.2-7.tar.bz2 4 tar xjvf ImageMagick-6.4.2-7.tar.bz2 5 sudo mv ImageMagick-6.4.2 /usr/src 6 cd /usr/src 7 sudo ln -s ImageMagick-6.4.2 imagemagick 8 cd imagemagick 9 ./configure --prefix=/usr/local/stow/imagemagick 10 make 11 sudo make install 12 cd /usr/local/stow 13 sudo xstow imagemagick
Bulk resizing images with Imagemagick.
Quick and dirty, but handy one-liner that resizes all *.jpg files in the current directory.
1 for image in *.jpg; do convert $image -resize 800x600 800x600-$image; done
Installing ImageMagick, mini-magick and rmagick on Mac OS X Leopard
I had no success installing ImageMagick and mini-magick with the instructions I found on this page but after some googling I found this blog post, which had the magic commands that worked for me:
1 sudo port install tiff -macosx #disables the linkage with Apple's open gl 2 sudo port install ImageMagick 3 4 sudo gem install rmagick 5 sudo gem install mini_magick
To test mini-magick, open an irb console and paste in the following code:
1 require 'rubygems' 2 require 'mini_magick' 3 4 path = "public/images/0000/0003/logo.jpg" 5 image = MiniMagick::Image.new(path) 6 7 #print width and height 8 puts image[:width] 9 puts image[:height]
Screenshot in wmii
Method 1
A simple script to create a screenshot in wmii. It probably works in other window managers too. I call it ‘scrot’. Put it in the path and run it as you’d run any program in wmii. The “import” program comes with imagemagick.
1 #!/bin/bash 2 import -window root /tmp/screenshot.png
Method 2
If you want timestamped screenshots then
1 apt-get install scrot 2 mkdir -p ~/screenshots
And create a script with the following content for making the screenshot.
1 #!/bin/bash 2 scrot '%Y-%m-%d-%H-%M-%S_$wx$h_scrot.png' -e 'mv $f ~/screenshots'