PDA

View Full Version : Rotate a image to an exact angle - command line



pavel.hrubes
06.05.2013, 09:52 AM
Irfan has good fine rotation tool (ctrl+U, rotate by angle)...
It is possible to use it in command line and set exact angle of rotation? I have found only left and right rotation by 90 degree.
Thanks P.

Mij
06.05.2013, 08:32 PM
There is no Command line option to do that.
How would you intend to use it? If you had a lot of images to modify all with the same angle of rotation then I can see it would be possible to do that from a single command line, but if they all required different angles you would have to write a batch or script file to supply an angle to go with each file name. You need to weigh the time taken to write this sort of file against the time you would take to do the job manually in the GUI.

I gave an example here (https://irfanview-forum.de/showthread.php?t=6098&page=2&p=36912&viewfull=1#post36912) of how to write a VBS script file to send key strokes to Irfanview to automate actions in the GUI. After sending Ctrl+U, the angle is highlighted in the dialog, so you can follow by sending the required angle as text and then {enter} to perform the function you want. All sorts of actions are possible in a script file such as reading a file name from a prepared table, extracting (or calculating) parameters to be applied to that file and then sending the keystrokes necessary to perform the action. However it is only worth the effort of writing and getting to work such a script file if you want to use it many times over.

pavel.hrubes
07.05.2013, 11:24 AM
Thanks for your info and code. I am running R code (http://www.r-project.org/) downloading plenty of images from Web Map Service that I need to rotate each on different angle from GPS bearing.
Irfan was my first choice. By the time I have found R package "biOps" that has various rotate functions.