-
Senior Member
registered user
[SCRIPT] Rotate (sharpen,...) images with a right-click
For Windows XP, there is a power tool that lets you rotate images by right-clicking. Now, there is this feature for Knoppix too. Simply run the following or put it in your knoppix.sh and then you can rotate images in Konqueror with a right-click.
Code:
#!/bin/bash
#################### OUTDATED, FOR NEW VERSION SEE BELOW ####################
# rotate images by right-clicking in Konqueror
# by probono
# This script is published under the GPL
mkdir -p ~/.kde/share/apps/konqueror/servicemenus
cat >> ~/.kde/share/apps/konqueror/servicemenus/rotate_ccw.desktop <<EOF
[Desktop Entry]
ServiceTypes=image/png,image/jpeg,image/gif
Actions=rotate_ccw
[Desktop Action rotate_ccw]
Name=Rotate counter-clockwise
Icon=rotate_ccw
Exec=/bin/sh -c "for file in %U; do mogrify -rotate 270 $file; done"
EOF
cat >> ~/.kde/share/apps/konqueror/servicemenus/rotate_cw.desktop <<EOF
[Desktop Entry]
ServiceTypes=image/png,image/jpeg,image/gif
Actions=rotate_cw
[Desktop Action rotate_cw]
Name=Rotate clockwise
Icon=rotate_cw
Exec=/bin/sh -c "for file in %U; do mogrify -rotate 90 $file; done"
EOF
-
Senior Member
registered user
Btw, this solution is done using imagemagick. You can also resize, rotate, sharpen, color reduce, or add special effects to an image or image sequence and save your completed work in the same or differing image format. Have a look at /usr/share/doc/imagemagick/html/ImageMagick.html in Knoppix.
For information on how to make the context menus, there is an excellent article on http://developer.kde.org/documentati...vicemenus.html
So, be creative!
-
Senior Member
registered user
very cool!
![Quote](images/misc/quote_icon.png)
Originally Posted by
probono
Btw, this solution is done using imagemagick. You can also resize, rotate, sharpen, color reduce, or add special effects to an image or image sequence and save your completed work in the same or differing image format. Have a look at /usr/share/doc/imagemagick/html/ImageMagick.html in Knoppix.
For information on how to make the context menus, there is an excellent article on
http://developer.kde.org/documentati...vicemenus.html
So, be creative!
Thats a very cool script! I like it a lot.
I created a bug report and will try to get it in the next iso, if I find the time. (my todo list grows longer
)
cu
Fabian
-
does this do a lossless jpg rotate?
regards,
Jim
-
Senior Member
registered user
Re: very cool!
![Quote](images/misc/quote_icon.png)
Originally Posted by
Fabianx
I created a bug report and will try to get it in the next iso
If you want to include it in the ISO, you don't have to put the script on the CD, just copy the files it creates in ~/.kde/share/apps/konqueror/servicemenus/ to /usr/share/apps/konqueror/servicemenus.
-
Senior Member
registered user
![Quote](images/misc/quote_icon.png)
Originally Posted by
true1ever
does this do a lossless jpg rotate?
the new version does, and it also preserves EXIF data:
Code:
#!/bin/bash
# Lossless JPG image rotation in the Konqueror context menu
# uses jpegtran which comes with Knoppix
#
# by probono
# GPL
mkdir -p ~/.kde/share/apps/konqueror/servicemenus
cat >> ~/.kde/share/apps/konqueror/servicemenus/rotate.desktop <<EOF
[Desktop Entry]
ServiceTypes=image/jpg,image/jpeg
Actions=rotatejpgCCW;rotatejpgCW;fliphor;flipver
[Desktop Action rotatejpgCCW]
Name=Rotate Counterclockwise
Icon=rotate_ccw
Exec=/bin/sh -c "for file in %U; do jpegtran -copy all -rotate 270 -outfile rotate \$file; mv rotate \$file; done"
[Desktop Action rotatejpgCW]
Name=Rotate Clockwise
Icon=rotate_cw
Exec=/bin/sh -c "for file in %U; do jpegtran -copy all -rotate 90 -outfile rotate \$file; mv rotate \$file; done"
[Desktop Action fliphor]
Name=Flip Horizontal
Exec=/bin/sh -c "for file in %U; do jpegtran -copy all -flip horizontal -outfile rotate \$file; mv rotate \$file; done"
[Desktop Action flipver]
Name=Flip Vertical
Exec=/bin/sh -c "for file in %U; do jpegtran -copy all -flip vertical -outfile rotate \$file; mv rotate \$file; done"
EOF
It is now no longer based on imagemagick, but now based on http://www.solidhosting.nl/~arends/kde/ " For losness rotating JPG images the script uses jpegtran. This program is provided by the Indepentent JPEG group in libjpeg."
-
Senior Member
registered user
![Quote](images/misc/quote_icon.png)
Originally Posted by
probono
![Quote](images/misc/quote_icon.png)
Originally Posted by
true1ever
does this do a lossless jpg rotate?
the new version does, and it also preserves EXIF data:
Code:
#!/bin/bash
# Lossless JPG image rotation in the Konqueror context menu
# uses jpegtran which comes with Knoppix
#
# by probono
# GPL
mkdir -p ~/.kde/share/apps/konqueror/servicemenus
cat >> ~/.kde/share/apps/konqueror/servicemenus/rotate.desktop <<EOF
[Desktop Entry]
ServiceTypes=image/jpg,image/jpeg
Actions=rotatejpgCCW;rotatejpgCW;fliphor;flipver
[Desktop Action rotatejpgCCW]
Name=Rotate Counterclockwise
Icon=rotate_ccw
Exec=/bin/sh -c "for file in %U; do jpegtran -copy all -rotate 270 -outfile rotate \$file; mv rotate \$file; done"
[Desktop Action rotatejpgCW]
Name=Rotate Clockwise
Icon=rotate_cw
Exec=/bin/sh -c "for file in %U; do jpegtran -copy all -rotate 90 -outfile rotate \$file; mv rotate \$file; done"
[Desktop Action fliphor]
Name=Flip Horizontal
Exec=/bin/sh -c "for file in %U; do jpegtran -copy all -flip horizontal -outfile rotate \$file; mv rotate \$file; done"
[Desktop Action flipver]
Name=Flip Vertical
Exec=/bin/sh -c "for file in %U; do jpegtran -copy all -flip vertical -outfile rotate \$file; mv rotate \$file; done"
EOF
It is now no longer based on imagemagick, but now based on
http://www.solidhosting.nl/~arends/kde/ " For losness rotating JPG images the script uses jpegtran. This program is provided by the Indepentent JPEG group in libjpeg."
thx, both scripts will be added in next iso.
cu
Fabian
Similar Threads
-
By knopx4me in forum Customising & Remastering
Replies: 0
Last Post: 03-06-2005, 08:06 PM
-
By gotsanity in forum Hdd Install / Debian / Apt
Replies: 4
Last Post: 12-06-2004, 06:28 AM
-
By Slay3r in forum General Support
Replies: 4
Last Post: 07-17-2004, 04:35 AM
-
Replies: 11
Last Post: 01-28-2004, 01:57 AM
-
By Dallas Eschenauer in forum General Support
Replies: 2
Last Post: 09-06-2003, 09:19 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![Dell PowerEdge R730 2x E5-2699V3 2.3Ghz 36 Core 128GB RAM H730 X520-I350 2x750W picture](/store/img/g/W38AAOSwtcVjVC0Z/s-l225/Dell-PowerEdge-R730-2x-E5-2699V3-2-3Ghz-36-Core-12.jpg)
Dell PowerEdge R730 2x E5-2699V3 2.3Ghz 36 Core 128GB RAM H730 X520-I350 2x750W
$329.99
![Dell PowerEdge R630 Server 2x E5-2680 V4 = 28 Cores S130 32GB RAM NEW 480GB SSD picture](/store/img/g/vx0AAOSwvwFlExVY/s-l225/Dell-PowerEdge-R630-Server-2x-E5-2680-V4-28-Cores-.jpg)
Dell PowerEdge R630 Server 2x E5-2680 V4 = 28 Cores S130 32GB RAM NEW 480GB SSD
$197.99
![Dell PowerEdge R630 Server 2x E5-2640v3 2.60Ghz 16-Core 64GB H330 picture](/store/img/g/ZD0AAOSwm41mOZYw/s-l225/Dell-PowerEdge-R630-Server-2x-E5-2640v3-2-60Ghz-16.jpg)
Dell PowerEdge R630 Server 2x E5-2640v3 2.60Ghz 16-Core 64GB H330
$182.65
![Dell Poweredge R630 Server 2x E5-2620 V4 =16 Cores | S130 | 32GB RAM | 2x trays picture](/store/img/g/GAcAAOSw9Q1mGSZW/s-l225/Dell-Poweredge-R630-Server-2x-E5-2620-V4-16-Cores-.jpg)
Dell Poweredge R630 Server 2x E5-2620 V4 =16 Cores | S130 | 32GB RAM | 2x trays
$159.99
![DELL POWEREDGE R630 8 x 2.5'' 2X E5-2680V4 32GB RAM IDRAC ENT & NDC 2X 495W PSU picture](/store/img/g/mkkAAOSwE5ZmT1Cg/s-l225/DELL-POWEREDGE-R630-8-x-2-5-2X-E5-2680V4-32GB-RAM-.jpg)
DELL POWEREDGE R630 8 x 2.5'' 2X E5-2680V4 32GB RAM IDRAC ENT & NDC 2X 495W PSU
$184.95
![Dell PowerEdge R720xd 26HDD 300gb 2.5-inch E5-2697 X 2CPU 384RAM 7.2 Tb HDD  picture](/store/img/g/yAwAAOSwdyNlgQ8d/s-l225/Dell-PowerEdge-R720xd-26HDD-300gb-2-5-inch-E5-2697.jpg)
Dell PowerEdge R720xd 26HDD 300gb 2.5-inch E5-2697 X 2CPU 384RAM 7.2 Tb HDD 
$180.00
![Dell PowerEdge T620 8-Bay LFF Xeon E5-2660 0 2.20GHz 48GB NO HDD S110 Server picture](/store/img/g/ZfUAAOSw~TFmclF7/s-l225/Dell-PowerEdge-T620-8-Bay-LFF-Xeon-E5-2660-0-2-20G.jpg)
Dell PowerEdge T620 8-Bay LFF Xeon E5-2660 0 2.20GHz 48GB NO HDD S110 Server
$174.99
![Dell PowerEdge R620 Server - 256GB RAM, 2x8cCPU, 120Gb SSD/3x900Gb SAS, Proxmox picture](/store/img/g/480AAOSw9TVl9vAv/s-l225/Dell-PowerEdge-R620-Server-256GB-RAM-2x8cCPU-120Gb.jpg)
Dell PowerEdge R620 Server - 256GB RAM, 2x8cCPU, 120Gb SSD/3x900Gb SAS, Proxmox
$320.00
![Dell Poweredge R630 2x Xeon E5-2680 v4 2.4ghz 28-Cores / 128gb / H330 / 2x 1TB picture](/store/img/g/7XkAAOSwnhFkFNvU/s-l225/Dell-Poweredge-R630-2x-Xeon-E5-2680-v4-2-4ghz-28-C.jpg)
Dell Poweredge R630 2x Xeon E5-2680 v4 2.4ghz 28-Cores / 128gb / H330 / 2x 1TB
$334.99
![DELL PowerEdge R630 8SFF Server 2x E5-2690v4 2.6GHz =28 Cores 256GB H730 4xRJ45 picture](/store/img/g/qfQAAOSw9XRklkNR/s-l225/DELL-PowerEdge-R630-8SFF-Server-2x-E5-2690v4-2-6GH.jpg)
DELL PowerEdge R630 8SFF Server 2x E5-2690v4 2.6GHz =28 Cores 256GB H730 4xRJ45
$562.00