Pages: 1 [2] 3   Go Down

Author Topic: Crop aspect ratio  (Read 19314 times)

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18090
  • When everyone thinks the same, nobody thinks
    • My website
Re: Crop aspect ratio
« Reply #20 on: September 24, 2010, 10:17:20 am »

... I did this. I have the same results....

That would be possible only if you forgot to remove "px" from the Crop tool's Width and Height fields.

JeanMichel

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 524
Re: Crop aspect ratio
« Reply #21 on: September 24, 2010, 11:45:09 am »

Hi again,

I gather that what Michael is trying to attempt is to crop images to end up with any size (in whatever units he works in) at the 'native' resolution. He doesn't care if the end image is 6 units by 9 or 6 by 4 or whatever as long as the pixel resolution does not change.

Here is what happens in the real world:

I open an uncropped  image from ACR (from Canon 5D2, 16 bit). The Pixel Dimensions (file size) is 120.3 mb, (5616 by 3744 pixels -- that is what the camera sensor produces)
The document size becomes 112.32 by 74.88 picas at 300 pixels per inch.
That also happens to be a 2 by 3 size ratio.

Since I will be printing on 13 by 19 inches paper and want to start with non-fractional units, I change to document size to 108 by 72 picas in the Image Size panel, having deselected the Resample Image check box I end up with the same pixel dimensions but now the resolution is 312 pixels per inch.

In Preferences (Cmd-K on a Mac) I make sure that my units are in picas (you can choose whatever unit flavour you prefer).

Now let's use the crop tool.

First I simply go for the crop tool leaving all the boxes (width, height and resolution blank). I crop an area measuring 90 picas by 60 picas (2 by 3 ratio) -- use the Info panel to see the measurements. That makes for an image with the following dimensions: 83.6 mb, 4680 by 3120 pixels; 90 by 60 picas document size and 312 pixels per inch resolution. There has been no resampling, I simply used a pair of scissors to cut out a smaller image from the larger one. If I crop a smaller area, say 36 picas by 24 picas I will simply have a smaller 13.4 mb, 1873 by 1249 pixels; 36 by 24 pica document at 312 pixels

Second
I enter 90 picas and 60 picas in the width and height boxes but leave the resolution blank.
I use the crop tool and drag an area to be cropped. The tool's marquee is proportional to the 90 by 60 size. I adjust the box size and location to my liking and Enter.
This, in this particular case, gives me an image of 55.4 mb, 3812 by 2541 pixels; and a document size of 90  by 60 picas and a resolution of 254.133 pixels per inch. There has been no resampling. A different crop will produce the same document size but with different pixel dimension and resolution.

Third
This time I enter 90, 60 and a 312 ppi resolution.
Crop, it does not matter what the actual cropped area is the following sizes will be always the same -- whether your crop area is tiny or larger -- the sizes will always be:
83.6 mb, 4680 by 3120 pixels; 90 by 60 picas and 312 pixels per inch. In this case you are enlarging the cropped area to the 90 by 60 picas size.

Units
The crop tool will always use the units that you set in you preferences. You cannot change the units, say inches instead of picas in the boxes. The width and height boxes must be in units -- pixels, inches, cm, picas... you cannot  have a number and no units.

So, you cannot set a crop ratio parameter in PS. You can only crop using sizes you set yourself; you have to figure out if the crop area fits you desired ratio by doing a manual calculation.

The easiest way to crop using a set ratio is to do it in Camera Raw, I don't know if Lightroom or Aperture have similar tools.

I hope that this helps and does nor muddify!

Jean-Michel
 



Logged

mbalensiefer

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 297
Re: Crop aspect ratio
« Reply #22 on: September 24, 2010, 11:56:25 am »

Ok;
 There is no way that I can enter "nothing" as the unit "type" in the Height and Width boxes. But I am now working in inches (in) instead of pixels (px).:O

The problem for me now is that working in inches changes my print resolution, or dpi:

What I am trying to do is simply crop all of my images to a set H/W ratio so that they will fit inside their image placeholders within my Web site.

I am simultaneously watermarking my images:
 But when "print resolution" (dpi) changes, then my watermark is skewed in size; very skewed in fact, as I perform a Photoshop "File>Place" of my watermark.
 I may need to create a batch file that will change my resolution back to 72 dpi before I place watermarks/text atop my images.

I find it hard to believe that PS cannot make this easier, lol.

Jean; can Camera Raw import a cropped photo into Photoshop? I am trying to limit file "saves" to prevent artifacting.

Thanks all for your help!
Michael
Logged

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18090
  • When everyone thinks the same, nobody thinks
    • My website
Re: Crop aspect ratio
« Reply #23 on: September 24, 2010, 12:09:34 pm »

... So, you cannot set a crop ratio parameter in PS. You can only crop using sizes you set yourself; you have to figure out if the crop area fits you desired ratio by doing a manual calculation....

Unless I misunderstood something, this is not correct. By entering 2 and 3 into the Crop tool's W & H fields, while leaving the Resolution field blank, you are setting a crop ratio, and you do not have to do any manual calculation, as your crop area will always retain the 2/3 ratio.

mbalensiefer

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 297
Re: Crop aspect ratio
« Reply #24 on: September 24, 2010, 12:16:54 pm »

Hi Slobodan,

 Yes; a crop "ratio/ aspect ratio" is effected in your above.
However, units (px, pi, in, etc.) are entered automatically, and these areas cannot be left blank?

Michael
Logged

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18090
  • When everyone thinks the same, nobody thinks
    • My website
Re: Crop aspect ratio
« Reply #25 on: September 24, 2010, 12:42:30 pm »

... However, units (px, pi, in, etc.) are entered automatically, and these areas cannot be left blank?...

They can not be left blank, true, but units are irrelevant, i.e., you end up with the desired crop ratio anyway, as if you just entered 2 and 3 without units.

mbalensiefer

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 297
Re: Crop aspect ratio
« Reply #26 on: September 24, 2010, 12:54:59 pm »

Thank you.

 Yes. I would like to crop my images by aspect ratio alone--without resizing them all over the place. Using all these techniques, my images either shrink well below original dimensions or become huge when I've started off with small images.

 My original images are of varied sizes. :(

 
Logged

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18090
  • When everyone thinks the same, nobody thinks
    • My website
Re: Crop aspect ratio
« Reply #27 on: September 24, 2010, 01:30:44 pm »

... I would like to crop my images by aspect ratio alone--without resizing them all over the place....

Once again, this is a logical impossibility, not Adobe's fault. You can not crop without resizing, as cropping is resizing by definition. To prove the point, forget Photoshop... try cropping with a pair of scissors, and you will see that the end result must always be smaller than the original.

JeanMichel

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 524
Re: Crop aspect ratio
« Reply #28 on: September 24, 2010, 01:37:22 pm »

Hi again,

Michael, you are asking for close to the impossible. Slobodan is correct is saying that you can enter 2 and 3 and will end up with an image of that ratio regardless of units, etc. In my examples, if I had simply entered 2 and 3 (picas are smallish -- 6 picas to an inch) my document size resolution would have been in the thousands of ppi, which is OK. I could have then resized the image in Image Size, with or without resampling to the actual size I wanted -- if resampled, the quality of the result would vary depending on the final document size and ppi.

I am not a web designer (I make prints, and I make images to fit into print publications) but I believe that for the web you should work using pixel dimensions.

In any and all cases, you need to know the final size and use of the image. If, for example, your web template calls for a 640 by 960 pixels image, then you can simply set your crop tool to 640 by 960 pixels at 72 ppi (anything above 72 ppi is wasteful) and be done with it.

Jean-Michel

And yes, you can open a PS file in ACR but that would be convoluted.
Logged

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1852
    • Frank Disilvestro
Re: Crop aspect ratio
« Reply #29 on: September 24, 2010, 03:04:45 pm »

Another option is to use the marquee tool and then Image->Crop.

When you select the marquee tool, in the option bar, select "Fixed Aspect Ratio" in the style section and write the desired numbers in the height and width boxes. Draw your marquee and next go to Image->Crop.

The final image will have the same DPI as the original since no resampling is performed.

AFairley

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1486
Re: Crop aspect ratio
« Reply #30 on: September 24, 2010, 03:38:39 pm »

Another option is to use the marquee tool and then Image->Crop.

When you select the marquee tool, in the option bar, select "Fixed Aspect Ratio" in the style section and write the desired numbers in the height and width boxes. Draw your marquee and next go to Image->Crop.

The final image will have the same DPI as the original since no resampling is performed.



Beat me to it.  I always use the marquee tool and Image->Crop because there can never be any resampling with this method, and I am free to define freehand, set up a ratio, or an actual size in pixels.  I stopped using the crop tool years ago, and now, with the perspective correction tools in the lens filter, there's no longer any use for the transform function included in the crop tool to correct keystoning, ect.
Logged

Wayne Fox

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4237
    • waynefox.com
Re: Crop aspect ratio
« Reply #31 on: September 24, 2010, 04:35:16 pm »

Ok;
 There is no way that I can enter "nothing" as the unit "type" in the Height and Width boxes. But I am now working in inches (in) instead of pixels (px).:O

The problem for me now is that working in inches changes my print resolution, or dpi:

What I am trying to do is simply crop all of my images to a set H/W ratio so that they will fit inside their image placeholders within my Web site.

I am simultaneously watermarking my images:
 But when "print resolution" (dpi) changes, then my watermark is skewed in size; very skewed in fact, as I perform a Photoshop "File>Place" of my watermark.
 I may need to create a batch file that will change my resolution back to 72 dpi before I place watermarks/text atop my images.

Michael
So now you are describing something different than your first post indicated.  You are not just trying to restrict your crop to a specific aspect ratio, but you area also wanting them to fit a placeholder in a website, which probably has a specific pixel dimension.  but then you don't want them resized, which seems odd if you are doing this to fit a specific placeholder, which probably as a specific size.  And of course, the "dpi" for a web image is irrelevant ..., all that matters is the actual pixel dimensions. 

I'm trying to wrap my head around exactly what you are trying to do and having a hard time.  However, it sounds like your problem can be easily resolved by creating an action which would possibly start after you create a selection with the selection rectangle, having it set to your desired aspect ratio.  Then you can crop it, resize it or simply change the DPI without resizing, etc.
Logged

mbalensiefer

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 297
Re: Crop aspect ratio
« Reply #32 on: September 27, 2010, 07:53:22 am »

Thanks much, all.

 I now have an alternative to the Crop tool to experiment with; the Marquee.
 The thing that I miss when using the Marquee tool is the Crop tool's "Shield Color" feature, where one can darken the opacity of the uncropped portion. This allows one to eyeball what details you are cropping out and which you are leaving; and thus affect a much better image.
 I am simultaneously trying to effect as non-destructive an edit as possible, so the fact Crop re-samples and the DPI-changing issue of this tool are factors as well.

 Is it confirmed that the Marquee tool does not resample?...Well on a "Difference" layer, one can still see changes between originals and Marquee-cropped re-saves; but the difference is staggering when comparing an original file to a re-save when using the Crop tool.

 I think that I should write to Adobe to see if they can implement the better Marquee features into the Crop tool, or the "Shield Color" feature of the Crop tool into the Marquee tool.
 Has anyone done this before? :P

Michael
Logged

stamper

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 5882
Re: Crop aspect ratio
« Reply #33 on: September 27, 2010, 08:00:02 am »

Posted in error. :)

Wayne Fox

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4237
    • waynefox.com
Re: Crop aspect ratio
« Reply #34 on: September 27, 2010, 02:37:24 pm »

Thanks much, all.

 I now have an alternative to the Crop tool to experiment with; the Marquee.
 The thing that I miss when using the Marquee tool is the Crop tool's "Shield Color" feature, where one can darken the opacity of the uncropped portion. This allows one to eyeball what details you are cropping out and which you are leaving; and thus affect a much better image.
 I am simultaneously trying to effect as non-destructive an edit as possible, so the fact Crop re-samples and the DPI-changing issue of this tool are factors as well.

 Is it confirmed that the Marquee tool does not resample?...Well on a "Difference" layer, one can still see changes between originals and Marquee-cropped re-saves; but the difference is staggering when comparing an original file to a re-save when using the Crop tool.

 I think that I should write to Adobe to see if they can implement the better Marquee features into the Crop tool, or the "Shield Color" feature of the Crop tool into the Marquee tool.
 Has anyone done this before? :P

Michael
No, the crop command used with the marquee tool does not resample.

However, neither does the crop tool if you don't want it to.  The changes in the resolution have nothing to do with the file itself ... it is not resampled unless you put a number in the resolution box. You seem to be confusing the DPI resolution with the need to resample.  The file itself only has two numbers ... number of pixels in length and width.  The "resolution" of the file is simply the number used to determine the physical size of the image if output.  So when you see the "resolution" change after cropping, it isn't because it was resampled.  And yes, this is an odd behavior of the crop tool but it doesn't mean the file was resampled.

The issue of the file "resolution" or DPI, (which has no meaning or value unless you are printing it and has nothing to do with the file.), can be easily resolved with a simple two step action.  Start recording an action.  Select the crop tool and enter your ratio in some number.  (2x3, 200x300, 2000x3000 ... whatever). Drag and select your area and crop.  Then select Image Size from the Image menu.  Uncheck all check boxes, and enter whatever you want the final "resolution" to be.  (which will change the sizes as well).  Accept this and stop recording the action.  Now in the action, make sure the "dialog" option is enabled in your crop command (the little red dialog shows next to the check mark in the command in your action).  Now when you open an image, and run this action, it will start with the same selection, but you can move it or resize it.  Once you confirm the crop , the action will then change the resolution for you.  No resampling.
Logged

mbalensiefer

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 297
Re: Crop aspect ratio
« Reply #35 on: September 28, 2010, 01:19:40 am »

Hiya Wayne.

 I will try your new crop method when I get home.
 As an aside:

 Open a file, "xxxx.jpg".
 "Crop" the original file using the Marquee. Save the file as xxxx_Marq.jpg
 "Crop" the original file using the Crop tool. Save the file as xxxx_Crop.jpg

 Open the original file, "xxxx.jpg".
 Use either re-saved file to "Difference" layer atop the original file.
 Note the differences inherent between the Crop and Marquee'd files.

 You may want to Fullscreen your PS, and turn off your room lights. Turn background color to Black. I did all files at a PS .jpeg file size of 9 (which artifacts less than other file sizes), and the difference was still staggering. I contend that a traditional Crop always resamples, regardless of "DPI/PPI" input...?

~Michael
Logged

pegelli

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1664
    • http://pegelli.smugmug.com/
Re: Crop aspect ratio
« Reply #36 on: September 28, 2010, 08:17:54 am »

"Crop" the original file using the Crop tool. Save the file as xxxx_Crop.jpg

Michael, can you let us know which figures you included in the three boxes on the top of the screen while using the crop tool? (the boxes for length, height and resolution)
Logged
pieter, aka pegelli

mbalensiefer

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 297
Re: Crop aspect ratio
« Reply #37 on: September 28, 2010, 08:23:40 am »

Michael, can you let us know which figures you included in the three boxes on the top of the screen while using the crop tool? (the boxes for length, height and resolution)

Hi!
 As far as my above, I don't think it matters much for someone to see the difference. However, I'd start with a pixel height approximate to just below your PS screen size so that there is no dynamic resizing. PPI/DPI resolution doesn't matter; just keep it constant to eliminate all variables.

~Michael
Logged

pegelli

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1664
    • http://pegelli.smugmug.com/
Re: Crop aspect ratio
« Reply #38 on: September 28, 2010, 08:29:29 am »

I think Wayne Fox's point was that by leaving the resolution box empty it does not resample.
So try your test without putting a number there and I guess you'll see no resampling is happening.
Logged
pieter, aka pegelli

Wayne Fox

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4237
    • waynefox.com
Re: Crop aspect ratio
« Reply #39 on: September 28, 2010, 01:49:44 pm »


 Open a file, "xxxx.jpg".
 "Crop" the original file using the Marquee. Save the file as xxxx_Marq.jpg
 "Crop" the original file using the Crop tool. Save the file as xxxx_Crop.jpg

 Open the original file, "xxxx.jpg".
 Use either re-saved file to "Difference" layer atop the original file.
 Note the differences inherent between the Crop and Marquee'd files.

 You may want to Fullscreen your PS, and turn off your room lights. Turn background color to Black. I did all files at a PS .jpeg file size of 9 (which artifacts less than other file sizes), and the difference was still staggering. I contend that a traditional Crop always resamples, regardless of "DPI/PPI" input...?

~Michael
Well, the fact that you used jpgs makes it invalid. The jpeg compression and subsequent decompression may not result in exactly identical pixels. When you "crop" for this test are you cropping 100% of the image?  If not how do you know your "crops" were identical?  If they are exactly identical I would assume the jpg compressions may also result in differences.

So I opened an 8700 x 4500 horizontal image.   I used the crop tool, set to 4in x 5in and created a selection by starting off the image at the upper left corner and dragging off the bottom at the bottom right.  This create a vertical section of about 1/2 the image.  I cropped it and saved it as a tiff file.  I reopened the same image, and set the marquee tool to a 4 x 5 ratio and made the same selection rectangle, then cropped with the crop command.  I saved it as a tiff file.  the resulting files were about 4700x3700 in size.  I stacked one on the other, changed the blending mode to difference, and the result is a 100% pure black image ... no pixels in the image that are not 0,0,0.

The only difference in the two crops is because the crop tool demands a physical dimension (that's one of the reasons it was created) it will then calculate the DPI of the image, which is labeled the "resolution".  This will almost always leave you with an odd number.   The action fixes it easily.  You can also just create an action which fixes that and skip the crop part of the action.

The crop tool does not resample unless you have a number entered in the resolution box.  If you are getting a different result, it isn't a Photoshop problem.
Logged
Pages: 1 [2] 3   Go Up