9 Replies Latest reply: Jun 11, 2013 12:37 PM by Duke35
Duke35 Level 1 Level 1 (0 points)

I am having a hard time cropping to an exact pixel dimensions upon export.  For my work, I need to crop to exactly 2166X1600, with a tolerance of no more than one pixel off of those dimensions, i.e. 2166X1599. 

 

I set crop tool to 2166X1600 and crop all of my images.  On the export I constrain to largest dimension of 2166 in both horizontal and vertical directions. Results vary widely from right on 2166X1600 to several pixels off on the short side.  Sometimes more than 1600, and sometimes less.  Any thoughts as to why these constraints do not work exactly?  Some sets of images I have to redo as many as 25% of a gallery of 200-300 images.  Any thoughts?  Thanks!


Aperture 3, OS X Mountain Lion (10.8.2)
  • 1. Re: Cannot crop to an exact pixel dimensions
    Frank Caggiano Level 7 Level 7 (23,840 points)

    If I crop to 2166x1600 and then export setting Size To: to Original Size the exported image is 2166x1600 as reported by Preview.

     

    Have you tried that?

  • 2. Re: Cannot crop to an exact pixel dimensions
    Duke35 Level 1 Level 1 (0 points)

    Hi Frank,

     

    My images start at roughly 5760 × 3840 (22.1 MP).  When I use the crop tool, I set a custom crop to 2166X1600.  So my pre-export image should have an aspect ratio of (1.35375). 

     

    If I leave Size to: Original Size, it keeps the aspect ratio, but the dimensions are greater than the 2166X1600.  I never crop to less than 2166X1600 in the original image, as my images cannot be smaller than that. 


    That's why the Size To: Fit Within (Pixels) I set to 2166, so that in theory the long side will be 2166, whether it is portrait or landscape oriented.  If it keeps the correct aspect ratio to where I cropped, the short side should always be 1600.  It doesn't turn our that way.  One pixel on either side of 1600 is acceptable, two or more is not. 

     

    What I am going to try next is trying to set the custom crop to 1 and 1.35375, and then trying the export with the fit within 2166.  Maybe that will solve the problem.

  • 3. Re: Cannot crop to an exact pixel dimensions
    Frank Caggiano Level 7 Level 7 (23,840 points)

    Interesting. When I do the same thing (crop to 2166x1600) and then export at orginal size the image is 2166x1600.

     

    What version of Aperture are you using? I tried this with the latest release.

  • 4. Re: Cannot crop to an exact pixel dimensions
    léonie Level 9 Level 9 (51,740 points)

    It works here too, Frank; exporting with "jpeg - original size" gives the correct pixelsize in the Finder and reimporting to Aperture the same.

    Screen Shot 2013-06-08 at 06.05.01MESZ.PNG

    Only it takes a lot of patience to apply the custom crop in the first place with the exact dimensions 2166x1600. If not done while zoomed in, the custom crop may be off a pixel or two.

     

    When I use the crop tool, I set a custom crop to 2166X1600.  So my pre-export image should have an aspect ratio of (1.35375).

    " should have": Have youactually checked the pixelsize in Aperture's metadata overlay after cropping?

  • 5. Re: Cannot crop to an exact pixel dimensions
    Frank Caggiano Level 7 Level 7 (23,840 points)

    Only it takes a lot of patience to apply the custom crop in the first place with the exact dimensions 2166x1600.

    True. What I did was to crop the image as close as I could using the crop tool and then enter the exact values in the crop brick.

     

    regards

  • 6. Re: Cannot crop to an exact pixel dimensions
    léonie Level 9 Level 9 (51,740 points)

    True. What I did was to crop the image as close as I could using the crop tool and then enter the exact values in the crop brick.

     

  • 7. Re: Cannot crop to an exact pixel dimensions
    phosgraphis Level 2 Level 2 (295 points)

    I have to agree with the OP. One of my repetitive tasks is to output an image exactly 960x400. Regardless of the equivalent crop ratio I use (96x40,960x400,24x10,etc.) Aperture frequently (about 25% of the time) produces an image that is off by 1 or 2 pixels, e.g., the exported JPEG is 959x400. Adjusting the size or position of the crop usually fixes the problem, but it frequently takes multiple tries and on deadline that's unacceptable.

  • 8. Re: Cannot crop to an exact pixel dimensions
    Duke35 Level 1 Level 1 (0 points)

    See, I don't need to crop the original image to 2166X1600.  I need a finished image at 2166X1600.  Meaning, in theory I should be able to crop an image to 1:1.35375 ratio, which is 2166X1600, and export to constrain to 2166 on the longest side.  When it's constrained to 2166, the short side should always be 1600.   

     

    Here's where the problem is...  When you set the crop window to 2166X1600, you expect that when you size your crop on your image that the only options for the boundary are multiples of 2166X1600.  In reality, the crop visual boundaries are approximate.  Here's an example...

     

    I have an image that I have cropped to a finished size of 3185X2350.  Which is based upon a 2166X1600 crop.  When I export it, I need the 3185 to become 2166.  So the long side is constrained to 2166, and it is reduced by a factor of 1.47.  3185/2166=1.47  If I reduce the short side, 2350, by that same factor of 1.47 you end up with a short side of 1598.  Which is why I have a problem.

     

    My invalid assumption was that when you set specific pixel dimensions in the crop tool, that only those values would be shown in the crop tool's bounding box.  Photoshop can do it...

  • 9. Re: Cannot crop to an exact pixel dimensions
    Duke35 Level 1 Level 1 (0 points)

    phosgraphis, the issue is math and Aperture's crop tool.  I did some math and here's what I cam up with.  Now... How to fix it?

     

    I have an image that I have cropped to a finished size of 3185X2350.  Which is based upon a 2166X1600 crop.  When I export it, I need the 3185 to become 2166.  So the long side is constrained to 2166, and it is reduced by a factor of 1.47.  3185/2166=1.47  If I reduce the short side, 2350, by that same factor of 1.47 you end up with a short side of 1598.

     

    I am sure this work the same with your images.