Results 1 to 7 of 7

Thread: [SCRIPT] Rotate (sharpen,...) images with a right-click

Hybrid View

  1. #1
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159

    [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

  2. #2
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    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!

  3. #3
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    297

    very cool!

    Quote 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

  4. #4
    Member registered user
    Join Date
    Jan 2003
    Location
    NY
    Posts
    86
    does this do a lossless jpg rotate?

    regards,
    Jim

  5. #5
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159

    Re: very cool!

    Quote 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.

  6. #6
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    Quote 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."

  7. #7
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    297
    Quote Originally Posted by probono
    Quote 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

  1. Adding actions to mouse right click on folders
    By knopx4me in forum Customising & Remastering
    Replies: 0
    Last Post: 03-06-2005, 08:06 PM
  2. How do you turn off tap click with a touchpad.
    By gotsanity in forum Hdd Install / Debian / Apt
    Replies: 4
    Last Post: 12-06-2004, 06:28 AM
  3. Resize and rotate.
    By Slay3r in forum General Support
    Replies: 4
    Last Post: 07-17-2004, 04:35 AM
  4. 1-Click-Warehouse for ~/dist programs
    By probono in forum Klik
    Replies: 11
    Last Post: 01-28-2004, 01:57 AM
  5. Enable double click on desktop etc.
    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
  •  


Seagate ST500DM009 BarraCuda 500 GB 3.5

Seagate ST500DM009 BarraCuda 500 GB 3.5" SATA III Desktop Hard Drive

$14.99



5x HGST Ultrastar 4TB SAS 12Gb/s 7200RPM 3.5

5x HGST Ultrastar 4TB SAS 12Gb/s 7200RPM 3.5" HDD HUS726040AL5214 4Kn

$199.00



HGST 10TB Ultrastar SATA 6Gb 256MB 3.5

HGST 10TB Ultrastar SATA 6Gb 256MB 3.5" Enterprise HDD 0f27452 HUH73101ALE600

$170.00



Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5

Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5" 512e HDD NetApp X375A

$49.00



Toshiba 14TB MG07 MG07ACA14TEY 7.2K RPM SATA 6Gb/s 512e 3.5

Toshiba 14TB MG07 MG07ACA14TEY 7.2K RPM SATA 6Gb/s 512e 3.5" Enterprise HDD

$299.00



Seagate ST1000VM002 1TB 5900RPM 3.5

Seagate ST1000VM002 1TB 5900RPM 3.5" SATA 6GB/s HDD Video Hard Drive PC DVR

$24.99



Seagate Exos ST10000NM002C 10TB CMR 7200RPM SATA6Gb/s 3.5

Seagate Exos ST10000NM002C 10TB CMR 7200RPM SATA6Gb/s 3.5" Enterprise Hard Drive

$279.99



1 - Seagate Barracuda 1.5TB 7200RPM 3.5

1 - Seagate Barracuda 1.5TB 7200RPM 3.5" (ST31500341AS) HDD Wiped/Tested

$25.00



Dell EMC WD-HITACHI H5H72101CLAR10T0 10TB 7.2K SAS 12Gb/s SED 3.5in A POH 0-50k picture

Dell EMC WD-HITACHI H5H72101CLAR10T0 10TB 7.2K SAS 12Gb/s SED 3.5in A POH 0-50k

$189.99



Dell Constellation ES.3 3TB Enterprise-class Hard Drive (Wiped & Tested) picture

Dell Constellation ES.3 3TB Enterprise-class Hard Drive (Wiped & Tested)

$39.00