Author Topic: Sort by orientation?  (Read 9441 times)

Offline dmwierz

  • Member
  • **
  • Posts: 50
    • View Profile
Sort by orientation?
« on: August 09, 2007, 10:46:11 AM »
I am using Genuine Fractals to resize my images prior to submission, and GF can't run under PhotoShop's Image Processor, so to resize pixel dimension, I need to process all the horizontal images in one batch, then all the vertical images in the next. I need to end up with images not-to-exceed a certain pixel dimension on the longest side.

Is there a way to sort within PM by orientation such that all horizontal images appear first and then all vertical? This would have to be smart enough to account for the fact that these images may not be the same size (even all the horizontal or vertical ones) as a result of cropping performed in PS, which may throw a fly in the ointment os using something like sorting by "width" if an image has been aggressively cropped.

Thanks in advance.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Sort by orientation?
« Reply #1 on: August 09, 2007, 11:16:12 AM »
I am using Genuine Fractals to resize my images prior to submission, and GF can't run under PhotoShop's Image Processor, so to resize pixel dimension, I need to process all the horizontal images in one batch, then all the vertical images in the next. I need to end up with images not-to-exceed a certain pixel dimension on the longest side.

Is there a way to sort within PM by orientation such that all horizontal images appear first and then all vertical? This would have to be smart enough to account for the fact that these images may not be the same size (even all the horizontal or vertical ones) as a result of cropping performed in PS, which may throw a fly in the ointment os using something like sorting by "width" if an image has been aggressively cropped.

Thanks in advance.

I'd try creating a custom sort using the {rotation} variable.  It doesn't care about the width and height of the image, it uses the Exif rotation sensor data.

That may work for you.

-Kirk

Offline dmwierz

  • Member
  • **
  • Posts: 50
    • View Profile
Re: Sort by orientation?
« Reply #2 on: August 09, 2007, 11:25:57 AM »
Kirk,

OK, thanks. This will work for all images that haven't been converted from vertical to horizontal (or vice versa) in cropping, as the embedded orientation info is recorded when the image is captured, correct?

I'll give it a go.

Dennis

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Sort by orientation?
« Reply #3 on: August 09, 2007, 11:32:29 AM »
Dennis,

OK, thanks. This will work for all images that haven't been converted from vertical to horizontal (or vice versa) in cropping, as the embedded orientation info is recorded when the image is captured, correct?

I'll give it a go.

In general, yes the orientation sensor tag is either zeroed out or is omitted altogether when saving a file in most applications.

-Kirk

Offline dmwierz

  • Member
  • **
  • Posts: 50
    • View Profile
Re: Sort by orientation?
« Reply #4 on: August 09, 2007, 11:45:07 AM »
Oh, good thing you mentioned this. So if I crop or otherwise edit the file, the "Rotate" tag is lost? So I'd have to do my sort up front, before any editing, then remember which images might have been changed from horizontal to vertical...

You guys ought to add a capability like Lightroom has (if I'm not mistaken) to sort by aspect ratio...that would be SO much simpler.

Thanks again,

Dennis

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Sort by orientation?
« Reply #5 on: August 09, 2007, 03:55:23 PM »
Oh, good thing you mentioned this. So if I crop or otherwise edit the file, the "Rotate" tag is lost? So I'd have to do my sort up front, before any editing, then remember which images might have been changed from horizontal to vertical...

You guys ought to add a capability like Lightroom has (if I'm not mistaken) to sort by aspect ratio...that would be SO much simpler.

I discussed this with Dennis Walker, and he has added two more variables {aspect} and {aspectcrop} which should suit your needs just fine.

These new variables are going to make it into the final 4.5.2 release.

-Kirk

Offline dmwierz

  • Member
  • **
  • Posts: 50
    • View Profile
Re: Sort by orientation?
« Reply #6 on: August 09, 2007, 04:08:45 PM »
Kirk,

That is so cool. Thanks. I presume i would then just use that variable within a custom sort, correct?

Is the aspect ratio contained in the image when it is captured, or is it a calculated value arrived at by dividing the height by the width and then converting it to a fraction?

Again, if one edits a shot, does this remove the embedded aspect ratio? Just need to know where to do my sort in my work flow, and if the data are erased, to be on the look-out for images that were cropped from horiz. to vert., and vice versa.

Dennis

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Sort by orientation?
« Reply #7 on: August 09, 2007, 04:16:46 PM »
Dennis,

That is so cool. Thanks. I presume i would then just use that variable within a custom sort, correct?

Yes.

Quote from: dmwierz
Is the aspect ratio contained in the image when it is captured, or is it a calculated value arrived at by dividing the height by the width and then converting it to a fraction?

The image data itself is referred to.  There is no Exif aspect ratio tag to draw information from.

Quote from: dmwierz
Again, if one edits a shot, does this remove the embedded aspect ratio? Just need to know where to do my sort in my work flow, and if the data are erased, to be on the look-out for images that were cropped from horiz. to vert., and vice versa.

The new variables should work just fine at any stage of your workflow.

-Kirk