sb-bimg — the batch image processing utility (hence the name «bimg» — Batch image). Sb-bimg can resize the image files, keep its' propotion while cropping the edges to confirm the target demension. There are several crop modes allowed: TOP, BOTTOM, LEFT, RIGHT, CENTER and NONE. The result of the final processing, with crop, will be saved in the coreesponded folders. Then you can chose the better result. Sb-bimg processes the forlders with recursion, keeps their structure in destination folder. The utility allows to rotate the images.
      For the processing without cropping you can chose one the two politics: atleast — both the width and the height of the target image will be AT LEAST not less than the target dimension; atmost — both the width and the height of the target image will not be greater than those in the target dimension.
      Once, there may be a situation when in the source folder there are photos that can be as in landscape mode so as in portrait one and already have been rotated, for example, in a standard windows image viewer utility. So, one part of the photos has dimension AxB, and the other part has BxA. Say, you want to print all these photos in minilab and prepare them to confirm the demand of 10x15 cm with 300 dpi resolution, i.e. specify the target dimension in sb-bimg as 1772x1181. At this, your source photos have the proportion other than 2:3, i.e. you need to use the crop with some variants (TOP, BOTTOM and CENTER e.g). So, to right do this task and to deal with those already rotated images you need to specify the option -m (Maximum preference) in W (Width). In this case the utility will be keep in mind that the width must be more than the height and, if the photo occurs with vice versa than sb-bimg will treat it as it have not been rotated initially.
May be too cumbersome at first look, but let try it.

Command line:

java -jar .\lib\sb-bimg.jar <-s <sourceDir>> <-d <destDir>> [-g <tgtWidth>x<targetHeight>] [-c <CLRTBN (Target Crop: Center | Left | Right | Top | Bottom | None)>] [-p <atleast | atmost>] [-q <X.XX (JPEG Quality)>] [-m <WHN (Max pref: Width | Height | None)>] [-v (Verbose)] [-r <[-]XXX (Rotation angle in degrees)>]

      Download: sb-bimg-1.0.0.zip   

Common rules working with programs