Why does the Hard Crop option Scale?

I have a number of custom image sizes. I noticed earlier, when I was publishing a new post, that the post image was cropped AND scaled. It is exactly the right dimensions.. but it isn’t the portion of the image it should be.

This is the code in functions.php, for this particular image size.
add_image_size( 'post', 800, 350, array( 'left', 'top' ) );

Take a look at the original size:

http://img.mywordpresstips.com/images/ThreadExtraction.png

Now look at the “hard cropped” version:

http://img.mywordpresstips.com/images/ThreadExtraction-800×350.png

It is practically the same image, only scaled..

Solutions Collecting From Web of "Why does the Hard Crop option Scale?"

They are not the same. In the 800×350 image, a little bottom is cropped.

This is how the hard cropped work:

First, It scale your image to match your image size. It can be width or height. Your size is 800×350

  • If your original image scaled according to width 800 has the height 400 (bigger than 350), 50px of bottom will be cropped ( because you choose 'top').
  • But if your original image scaled according to width 800 has the height not 400 but 300 (smaller than 350), It will be scaled according to height. Then the scaled version has height 350 and the width will be something bigger than 800, for example 850px, so 50px of the right will be cropped out because you choose 'left'.

Feel free to comment if you don’t get my poor explain.