Pages: [1]   Go Down

Author Topic: Help with batch resizing problem.  (Read 895 times)

Redcrown

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 507
Help with batch resizing problem.
« on: August 28, 2014, 04:25:13 pm »

I'm trying to batch resize images for loading on new Samsung Galaxy a tablet with a 2560x1600 pixel screen. That's a wide aspect ratio of 1.6. I'm experienced with the Image Processor (actually use the Russell Brown "Pro" version), Fit Image, plus a couple custom scripts.

To fit on the Samsung tablet, I want the images to be no bigger than 2560 pixels on the long side, AND no bigger than 1600 pixels on the short side. I want to maintain the original aspect ratio (no cropping).

The Image Processor and Fit Image both make the image no bigger than "x" on the long side OR "y" on the short side. The problem is the difference between "AND" and "OR" logic.

Example: If I give the Image Processor 2560 in both width and height to resize a 5616x3744 landscape image, I get a 2560x1707 image. The 2560 is good, the 1707 is too big. I want it to come out 2400x1600. I can enter resize dimensions of 2560x1600 and that works, but only on landscapes, so I would have to separate landscapes from portraits.

Anybody know a technique or a script that will resize portraits and landscapes with "AND" logic instead of "OR" logic?
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Help with batch resizing problem.
« Reply #1 on: August 28, 2014, 05:52:36 pm »

Example: If I give the Image Processor 2560 in both width and height to resize a 5616x3744 landscape image, I get a 2560x1707 image. The 2560 is good, the 1707 is too big. I want it to come out 2400x1600. I can enter resize dimensions of 2560x1600 and that works, but only on landscapes, so I would have to separate landscapes from portraits.

Anybody know a technique or a script that will resize portraits and landscapes with "AND" logic instead of "OR" logic?

Hi,

ImageMagick allows to do high quality resizing based on the smaller image dimension, so 1600x1600 in your case, and let the longer dimension overflow that box. It is therefore a fill operation, instead of a fit operation, and requires to use the "Fill Area" Flag ('^' flag). Of course that will produce images of 2400x1600 or 1600x2400 pixels when images with a 2:3 or 3:2 aspect ratio are used as input, but it would allow mixed landscape and portrait oriented images.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

Redcrown

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 507
Re: Help with batch resizing problem.
« Reply #2 on: August 29, 2014, 01:46:16 pm »

Thanks Bart for the tip,

I'm a little shy about Linux/Gimp stuff and command line interfaces, but you made me think to check FastStone. Lo and behold, FastStone does resizing just like I wanted.

Unfortunately, FastStone still has poor colorspace management. Basically, it can only handle sRGB correctly. If Tiff inputs are in any other colorspace (Adobe98, ProPhoto), FastStone outputs jpegs as "untagged". So I'd have to convert my ProPhoto Tiffs to intermediate sRGB tiffs before feeding them to FastStone for resized jpegs. Not elegant, but workable since it is an infrequent task.
Logged
Pages: [1]   Go Up