As of JPEGCrops 0.7.0b, it is possible to get JPEGCrips to execute third party programs upon certain events. It's somewht of a stretch to call it scripting, but it's easier to understand than "event-driven third party program execution with parameters".
In the Scripts-panel in preferences, 4 events can be customized. They are:
In the settings for each individual aspect, 2 events can be customized. They are:
Let's make background images for computer desktops. We want the following:
ImageMagick is a small collection of freeware command line based image manipulation programs. The official homepage is http://imagemagick.org/. If you're using Windows, go to the Binary Releases, scroll down to the bottom and download the Dynamic at 8 bits-per-pixel version. Be sure to enable Update executable search path in the install dialog.
When you open a new image in JPEGCrops and adjust the crop area, it should look like the screenshot below. When you press Crop, the image is cropped to the selected area and resized to 1024x768 pixels.
The command was convert.exe %D -resize 1024x768> -quality 95 %D. Let's take a detailed look at that.
convert.exe from the ImageMagick program pack.%D gets expanded to the destination file, which convert.exe needs to know.convert.exe to resize the image to 1024x768 pixels, but only if the image is larger than that (that's what the > part does). Smaller images won't be resized.%D gets expanded to the same as the first %D. This means that convert.exe will override the file, instead of creating a new one. That's okay, as it is the destination file.If you don't want to be restricted to the 4:3 aspect, but still want to resize the images to a maximum width or height, just choose Free size in the Add new aspect dialog.
On some systems, Windows behaves in a strange way when it comes to resolving commands. At least it's strange to me. If the example above does not work, you might try one of the following:
convert logo: logo.gif. A file with the name logo.gif should be created in the current directory.convert.exe in the ImageMagick installation directory and make a copy with the name iconvert.exe, then change convert in the example above to iconvert.