Author Topic: Resize to set height  (Read 3474 times)

Offline mosdave

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Resize to set height
« on: July 13, 2008, 02:29:33 AM »
Hi

I have selected a bunch of images both portrait and landscape orientation and want to output them as a JPG and resized so the height on each of the images is 500px and the width is whatever PM calculates in order for the aspect ratio to be maintained.

Is this possible?

I can only seem to get the longest dimension resized to 500px which is fine for portrait but not for landscape.

Cheers
Dave

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Resize to set height
« Reply #1 on: July 13, 2008, 07:29:44 AM »
Dave,

I have selected a bunch of images both portrait and landscape orientation and want to output them as a JPG and resized so the height on each of the images is 500px and the width is whatever PM calculates in order for the aspect ratio to be maintained.

Is this possible?

I can only seem to get the longest dimension resized to 500px which is fine for portrait but not for landscape.

Not directly.  You would need to sort your images into two groups, those that are landscape and those that are portrait.  Then run the landscape images through with a box size that would end up creating landscape images that are 500 pixels tall, and then the portraits through at size 500.

The box size for the landscape images can be calculated from the aspect ratio of the landscape images.  What pixel size are the landscape images currently?  I'd need the width and height.

-Kirk


Offline mosdave

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Resize to set height
« Reply #2 on: July 13, 2008, 11:15:44 AM »
Hi Kirk

Your suggestion is what I ended up doing. I divided the pictures into portrait and landscapes groups and calculated the landscape long dimension (753px) which gave me a height of 500px after resizing.

Cheers
Dave