New commands in Konquerors right-click menu

Rotate JPGs losslessly in Konqueror

To add a new menue entry in Konquerors rigtht-click menue I generated the following file:

~/.kde/share/apps/konqueror/servicemenus/burt_rotate_jpg.desktop

With the contents:

[Desktop Entry]
Actions=Rotate90
Encoding=UTF-8
ServiceTypes=image/jpeg

[Desktop Action Rotate90]
Exec=/home/entner/bin/burt_rotate-jpg %u 90
Name=Rotate JPG 90...
Name[de]=Rotiere JPG 90...
Icon=kuickshow

The contents of:

/home/entner/bin/burt_rotate-jpg

are:

#!/bin/sh

if [ $# -ne 2 ]
then echo;echo "Rotates a JPG image losslessly"
     echo
     echo "Usage is : `basename $0` <image.jpg> <90|180|270>"
     echo;echo
     exit 1
fi

imagefile=$1
rotation=$2
tmpfile=/tmp/burt_rotate_tmp_file`date -I`.tmp

jpegtran -rotate $rotation -copy all -trim $imagefile > $tmpfile
mv $tmpfile $imagefile

Whreas the command jpegtran is included in the package

jpegsrc.v6b.tar.gz

which can be downloaded from:
http://www.ijg.org/files/