When we prepare research paper, many journals require the resolution of images to be 300dpi.
Below is the script to change various image files to 300dpi TIFF format.
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 | #!/bin/bash #A script which converts various image file formats into 300 dpi TIFF format. #Usage: dpi300tiff.sh filename #Wild card can be used.</code> if [ $ # = 0 ] then echo "Please specify the files you want to convert!" echo "Usage: dpi300tiff.sh filename" exit 1 fi for image in "$@" do if [ -f $image ] then convert - units PixelsPerInch $image -density 300 ` echo $image | sed 's/\..*$/.tiff/' ` else echo "$image: No such file" fi done |