I installed a bare bones Arch Linux system today and took a screenshot. With no graphics utilities installed, I needed a way to convert a PNG to a GIF for a Simple Machines forum template thumbnail. I figured I’d use a command line utility to help me and ImageMagick is installed by default on most distributions. A quick read through the ImageMagick manpage and I found the convert command and thought I’d share it with everyone. Use convert in the following fashion: convert [input-options] input-file [output-options] output-file
convert SMFPress.png -channel Alpha -threshold 80% -resize 120x120 thumbnail.gif
This did a quick, same-size conversion with little loss for me to display the thumbnail online. For more information on the options I used and other options that I didn’t use, take a peek at the ImageMagick Online Help Page for convert.
This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.
