Convert bitmap to something else

Thu, 28 May. 2009 by Thomas Bendler, approximately 1 min to read.
#general #unix

A nice one-liner (you can also do it in one line if you like) to convert bitmaps i.e. to PNGs:

#! /bin/sh

for i in *.bmp; do
  convert "$i" "${i%.bmp}.png";
done
rm *.bmp

You only have to install “convert” on your system if it is not already installed.


Share on: