Multiple Crops at the Same Time?

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, xnview

Post Reply
Trenthee
Posts: 6
Joined: Wed Aug 12, 2015 11:29 am

Multiple Crops at the Same Time?

Post by Trenthee » Wed Aug 12, 2015 11:33 am

Is there a way to crop a single image multiple times in one go? In the below example I'd like to crop the image 4 times and save the croppings as 4 separate images while saving the original image. The way I do it now is to crop>save crop with unique file name>go back to original picture> and repeat this cycle until I have all the crops I want. Ideally I'd like to crop multiple times on a single image and save those croppings as unique files at the same time. The cropping part can't be automated because the croppings will be in different locations depending on the image. Is this possible with XNViewMP, or any other way?

Image

cday
XnThusiast
Posts: 2215
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Multiple Crops at the Same Time?

Post by cday » Wed Aug 12, 2015 1:48 pm

Trenthee wrote:Is there a way to crop a single image multiple times in one go? ... I'd like to crop the image 4 times and save the croppings as 4 separate images while saving the original image. ... The cropping part can't be automated because the croppings will be in different locations depending on the image.
There is no way I am aware of to set up multiple selections at the same time, even without the ability to then crop and save each selection as a separate file. If there were a great enough need -- there was a similar request recently -- the function could possibly be added eventually, but realistically it would be a low priority given Pierre's present workload.

The need to place the selections manually would also rule out the possibility of using a batch process, or more likely a series of batch operations, to make the required crops and create the required output files.

In general, the best approach to implement a repetitive process that requires a manual operation is probably to use a simple script (created using AutoHotKey or a similar scripting utility, for example) that performs a series of keyboard or mouse operations that are repeated each time. For example, after a selection has been drawn manually, a simple script assigned to a keyboard shortcut could save the image with the required file name as a single action.

Someone already familiar with the particular scripting utility could likely write a suitable script quite quickly, but otherwise there would probably need to be a need to process a fairly large number of images to make the effort of learning it worthwhile, although the investment required could pay off in future projects...

When the source image must be preserved, it would probably be necessary to process a copy of the source image, always a wise procedure anyway! :wink:

A simple copy action could also be included in the script or scripts used.

cday
XnThusiast
Posts: 2215
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Multiple Crops at the Same Time?

Post by cday » Wed Aug 12, 2015 2:06 pm

The commercial software Adobe Photoshop and I believe PaintShop Pro include macro recorders which can be used to automate image editing tasks.

I'm not sure how hard it would be to add a recorder function to XnViewMP, but it might be a useful addition when Pierre eventually has the time :?:

Post Reply