Batch Image Editing in Linux

Must know for web developers. Many batch tools are available in imagemagick. convert and mogrify are both great! sudo apt-get imagemagick will get you going

bash$ for i in *.jpg
do
convert -scale ’48×38′ $i TN_$i
echo $i processed
done

mogrify -format jpg -quality ‘95%’ *.tiff (bulk-conversion)

For more optimized images use the following:

bash$ for i in *.jpg
do
djpeg $i | pnmscale -xysize 48 38 | cjpeg -opti -progr -qual ‘75%’ > TN_$i
echo $i processed
done

Original post here (look for Tim’s comment):http://www.cyberciti.biz/tips/howto-linux-creating-a-image-thumbnails-from-shell-prompt.html


VI/VIM shortcuts

R    Overwrite text, press <Esc> to end
 :set nu    Display line numbers
G    Go to last line of the file
  
    :n   Go to line with this number (:10 goes to line 10)

%         Move to matching bracket:  ( { [ ] } )

/pattern/   forward to pattern

  /text   Search forward (down) for text (text can include spaces
                      and characters with special meanings.)
  
  ?text   Search backward (up) for text
  
  n       Repeat last search in the same direction
  
  N       Repeat last search in the opposite direction