how to rotate images from context menu?

Booting, installing, newbie
Message
Author
marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

how to rotate images from context menu?

#1 Post by marada2 »

I am running Precise puppy and want to know how to rotate images by using the context menu? I know I can open them up in a image editor and rotate them. but for speed of working I would prefer to do this on mouse click within the context menu. I can't find any settings for this in ROX - are they any other ways to get this working in puppy through another program / script?

My second question is when browsing thumbnails the icon size seems to be limited, I can't simply keep increasing it's size. Is there a way to increase thumbnail size a few times by pressing plus key for instance?

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#2 Post by Semme »

*Where* exactly are these images.. Inside FF?
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#3 Post by marada2 »

I am talking about images inside folders on my computer.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#4 Post by Semme »

Sounds like the "customize menu" item could be manipulated to call a script. How to write that script? :cool: SFR!
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

Latitude
Posts: 76
Joined: Sat 12 Jul 2014, 16:10
Location: Melbourne, Australia

#5 Post by Latitude »

You could run a Windows program called Irfanview under Wine (the Windows emulator) in Puppy. To rotate an image in Irfanview you would just press the "R" button, to rotate left press "L", to flip horizontally press "H", to flip vertically press "V".

I used to run Irfanview in Wine a couple of years ago, so I imagine it would still work in Wine now.

For info on Irfanview:
http://www.irfanview.com/

For info on running Wine in Puppy:
http://murga-linux.com/puppy/viewtopic.php?t=53675

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#6 Post by marada2 »

Latitude wrote:You could run a Windows program called Irfanview under Wine (the Windows emulator) in Puppy. To rotate an image in Irfanview you would just press the "R" button, to rotate left press "L", to flip horizontally press "H", to flip vertically press "V".

I used to run Irfanview in Wine a couple of years ago, so I imagine it would still work in Wine now.

For info on Irfanview:
http://www.irfanview.com/

For info on running Wine in Puppy:
http://murga-linux.com/puppy/viewtopic.php?t=53675
I installed Irfanview through Wine today and it works great, however It would be nicer if I could do this directly through the context menu by calling some sort of script. Or from a hotkey right inside the file manager.

Latitude
Posts: 76
Joined: Sat 12 Jul 2014, 16:10
Location: Melbourne, Australia

#7 Post by Latitude »

In Irfanview you can "batch process" a whole stack of images at once. As for running a hotkey from the Context Menu, like Semme says, you probably need help from someone who knows about writing Scripts and that isn't me!!! :roll:

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#8 Post by marada2 »

Well if you look at this 3rd post on this discussion there is someone who rotates images by calling a scrip - but he does not upload the script:

http://ns1.murga-projects.com/puppy/vie ... de030a2abb

Anyone have a script to rotate images? What would be really cool is if I could just select the images I want with the mouse and call the script from a hotkey.

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#9 Post by marada2 »

Does anyone know how to do this?

User avatar
Fossil
Posts: 1157
Joined: Tue 13 Dec 2005, 21:36
Location: Gloucestershire, UK.

#10 Post by Fossil »

marada2, Have you tried XNView? A batch-file can be written into the folder required. See the menu: Tools, Multi Convert, "Load Script". Yes, Irfanview can also be used, it's advanced menu will also do this - although having to load Wine - such a large program - to accomplish this task is somewhat off-putting.
Perhaps ImageMagick? See, Command-line Tools, convert: http://www.imagemagick.org/script/comma ... -tools.php
As for using a simple direct script: I wouldn't. Why? Because .jpeg images are what can best be described as sandbox pictures - with every 'enhancement' and subsequent 'save' the image will begin to degrade - the 'nudge-effect'. This might not be apparent in a very large jpeg image straight out of a modern digital camera, but when saved as a small email-sized or web-postable picture at a lower resolution - perhaps several times - and then reworked again, the picture will begin to degrade and show softness plus low-resolution image artifacts.
Just my pennyworth!

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#11 Post by rcrsn51 »

PeasyScale can do this with JPEGs. The operations are performed with jpegtran, which claims to be lossless.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#12 Post by MochiMoppel »

rcrsn51 wrote:PeasyScale can do this with JPEGs
From the ROX context menu?
I played with jpegtran and couldn't get it to rotate the image in place. It seems to require a dedicated output file. If that's the only way then this should work:

Code: Select all

#!/bin/sh
jpegtran -rotate 90 "$1" > /tmp/rotated.jpg; mv /tmp/rotated.jpg "$1"
After more than a dozen rotations the image hasn't degraded, so it's probably lossless :D
Select "Customize menu..." after right-clicking a jpg file and symlink the script.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#13 Post by Semme »

:cool: Beautiful Mochi >> Rt-clk thumbnail rotation works! Now how about a delayed rotate-on-hover?
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#14 Post by MochiMoppel »

Semme wrote: Now how about a delayed rotate-on-hover?
...followed by a triple Axel and a final death spiral? Image Piece of cake ...Image

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#15 Post by marada2 »

MochiMoppel wrote:
rcrsn51 wrote:PeasyScale can do this with JPEGs
From the ROX context menu?
I played with jpegtran and couldn't get it to rotate the image in place. It seems to require a dedicated output file. If that's the only way then this should work:

Code: Select all

#!/bin/sh
jpegtran -rotate 90 "$1" > /tmp/rotated.jpg; mv /tmp/rotated.jpg "$1"
After more than a dozen rotations the image hasn't degraded, so it's probably lossless :D
Select "Customize menu..." after right-clicking a jpg file and symlink the script.

Many thanks for this. Do you know if we can do a similar thing wtih Tiff and PNG?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

marada2 wrote:Do you know if we can do a similar thing wtih Tiff and PNG?
Install ImageMagick and replace the jpegtran command with convert.

http://www.minihowtos.net/imagemagick-rotate-image

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#17 Post by marada2 »

not really having much luck with ImageMagick. I installed imageMagick and replaced the jpegtran command with convert and nothing happens. Don't I have to put in the script somewhere imageMagick or else how does it know to call the imageMagick program to perform the action? Do you have an example script that you use with imageMagick?

As for the jpegtran script that works perfect, but I have no context menu with the rotate option if I select multiple files with the mouse - is there any way round this?

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#18 Post by MochiMoppel »

marada2 wrote:As for the jpegtran script that works perfect, but I have no context menu with the rotate option if I select multiple files with the mouse
Oh yes, there is a context menu, though a bit hidden - provided all selected files are jpg files. Also the script would have to be adapted for multifile processing.

First priority for you should be to get the ImageMagic tools working. This would make my primitive script obsolete. Unfortunately IM doesn't work for me either (missing dependencies), so I can't help you with that.

marada2
Posts: 64
Joined: Sat 19 Oct 2013, 22:50

#19 Post by marada2 »

Thanks Mochi

You said there is a context menu for multiple files but it is hidden -any ideas where? Also what needs adding to your script to get it to rotate multiple jpeg images?

as for the ImageMagic tools, if anyone does get these working on puppy I would be very grateful to hear how you did it.

Many thanks

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#20 Post by MochiMoppel »

marada2 wrote:You said there is a context menu for multiple files but it is hidden -any ideas where?
I said it's a bit hidden. Instead of R-click use Shift+R-click. This will take you straight to the "Open with.." submenu. Your script should appear at the top.
Also what needs adding to your script to get it to rotate multiple jpeg images?
Try this:

Code: Select all

#!/bin/sh
TMP="/tmp/rotated"
for file in "$@" ;do
    jpegtran -rotate 90 -outfile "$TMP"  "$file" 
    mv "$TMP" "$file"
done
I strongly recommend that you keep your originals in a safe place and try this only on copies. If something goes wrong and jpegtran creates an empty temporary file, you don't want your original file being overwritten by an empty file :wink:
as for the ImageMagic tools, if anyone does get these working on puppy
I think I got this working somehow, but first: What happens when you input convert into a console and press Enter? Do you get an error message?

Post Reply