convert

How to determine and convert text file encoding (file, enca, iconv)

To determine the file type of the file "sample.txt" you just type:
file sample.txt
Usually it'll tell you only that it is a text file. To get to know more about the encoding type:
enca -L none sample.text
The -L switch tells the program what language is used in the file. If you don't know, just use none.
To convert the encoding from ISO-8859-1 (latin1) to UTF-8:
iconv --from-code=ISO-8859-1 --to-code=UTF-8 sample_iso8859-1.txt > sample_utf-8.txt

Editing (resizing, format converting, compressing) images in the command line with ImageMagick (mogrify, convert)

Resize all tif images in the current directory:

mogrify -resize 25% 25% *.tif

Resize all jpeg images in the current directory to a width of 614 pixels and keep the image ratio constant:

mogrify -resize 614 *.jpg

As above, but resize the hight to 614 pixels:

mogrify -resize x614 *.jpg

Convert all bmp imgaes in the current directory into tiff images:

mogrify -format tiff *.bmp

Compress all tiff images in the current directory with ZIP compression:

How to convert EMF files into SVG format

The need for this appeared because the Unicorn software that controls our Äkta Explorer can only export the raw chromatographic curves in EMF format. Pathetic. After trying out various things, I went with OpenOffice. OpenOffice Draw can import EMF files and save as SVG. Other applications capable of opening EMF are FreeHand and CorelDraw (tested on Macintosh). However, FreeHand cannot export as SVG.