Photoshop crop tool distorts images
Sun, 08 August 2004 12:53
This is obviously a bug, and I have reported it to Adobe people, but it doesn't appear to be getting any attention, so I thought I'd post it here, because I am curious if I am the only person to have noticed it. The bug has existed at least since Photoshop 7, I haven't tested earlier versions, and I thought for sure that it would have been fixed in CS, but alas it is still there. I noticed it because I couldn't get PS to crop and rotate my photos to straighten the horizon.
Basically the crop tool, when used to resize and rotate at the same time dramatically distorts the image if the final image needs to be downsampled (shrunk) to achieve the final size. The mathematical term for the kind of distortion taking place is a shear. The more that the angle of rotation differs from 0, 90, 180 or 270 the more severe the distortion, with 45 degree angles being the worst. However, only a small reduction in pixel dimensions causes a pretty noticeable shear. Basically, the algorithm for choosing the source pixels for resampling the image is very wrong.
If you have never seen this bug in action it is very simple to demonstrate:
1. create an image, and fill it with a big chunky checkerboard pattern.
2. choose the crop tool and set the size (in the option window) to half the size of the file you created.
3. drag out a cropping rectangle, about 3/4 the size of your document
4. rotate it 45 degrees
5. hit enter
If you follow these steps, you should see a rotated (good) and sheared (bad) version of your checkerboard image.
Sun, 08 August 2004 14:02
Not only does this method of cropping distort as your test shows, but the resulting image can deviate substantially from the image area indicated by the crop marquee.
Sun, 08 August 2004 13:46
I brought this issue up on this forum a couple weeks ago. I too have noticed it for a while, maybe even before PS 7?
For the time being the obvious work-around (and from what I can tell, preferred by many users in this forum) is to rotate the canvas first (using Measure Tool plus Arbitrary Rotation) then crop to down-sample. An extra step, but gets the job done.
I agree, this bug should be addressed by Adobe.
Sun, 08 August 2004 15:27
Not only can it deviate substantialy, it must. The kind of distortion that it introduces (a shear) is only made possible by cropping the wrong shape. So not only are you getting a distorted image but you always get something other than the rectangle you selected.
For example if you take this image:
And try to do a 64x64 crop intending to get this result:
What you will actually get is this:
Mon, 09 August 2004 04:06
sod all chance of getting it fixed in cs...add it to the list of bugs found, that wont get fixed in a non happening cs.01
Mon, 09 August 2004 12:19
I can reproduce this on three boxes, OS 9.2 and 10.3 on both PS 7 and CS. I have my example posted: <http://home.earthlink.net/~bbadland/crop.html>
The original picture in the post was about 1000 x 1300 px. The crop tool set to resample down to 100 x 250 px, rotated about 25 degrees. You can clearly see the distortion.
Mon, 09 August 2004 12:15
Jonf - did you use the picture in my later post? If you set the crop size to 64x64 and crop it on a 45° angle exactly to the edges of thediamond, you should get the same wrong result as me, if you don't, I guess it doesn't "work" on the OS9 version.
Mon, 09 August 2004 12:08
I'm sorry to say I can't seem to duplicate this (PS 7 on OS 9.2). I get a few annoyingly jaggy edges, depending on the resolution of the image, but can find no discernable or measurable shear when following the steps outlined in the example. Am I the only one who is not getting this error? Could this be an OSX problem?
Mon, 09 August 2004 12:08
What annoys me is that I reported the bug in August LAST YEAR, which should have been plenty of time to get it fixed before the release of CS, it's the sort of silly mathematical error that takes no more than five minutes to fix (I know, I design software that renders graphics myself).
Mon, 09 August 2004 12:59
Hmmm... I can't reproduce this. with your file or mine.
PSCS 10.3.4 on a G4 733
Mon, 09 August 2004 14:00
Just to be clear - I get this distortion only when the crop tool is downsampling and rotated. If you tried it from my posted image, it wouldn't be apparent since the "original' has been reduced to web resolution for illustration. Try it on a large file where the crop will downsample a good amount.
Mon, 09 August 2004 14:33
Cool, I finally got the file to freak out.
Mon, 09 August 2004 14:43
I did use a larger file, but the variation from the original to the cropped size may not have been large enough in my first test. I just tried it going from a 600x600 px image down to 64x64, and the distortion was obvious and dramatic.
Tue, 10 August 2004 15:04
Jonf - That's why I used the checkerboard pattern in my example, a photo is harder to see the distortion because our brains are used to undistorting images for us, for example when you view a bilboard from an angle or even get a bad seat in the cinema.
Using the crop tool, even a tiny difference in size is enough to really cause distortion, as long as the angle is significant. Even though the size reduction is only about 10% in the colored checkerboard above causes a very noticeable skewing.
The other way to do it, if you are determined to use a photo, is to open a photo and use the rotate canvas arbitrary feature to rotate it 45° and then use the crop tool to try and crop it back to the original framing. What you will notice is the edges will never line up if there is any reduction in size.