I'm using imagecrop to crop big images 1000x750 pixels to a final size of 630x300 px

Some times I get images of 629x300 or 630x299. In some part of the code I lost 1pixel in one of the dimensions maybe due to some rounding.

I managed to fix it changing the image_scale imageapi call in the image_scale_and_crop function for a image_scale_and_crop call to ensure the exact final image size.

Now I'm getting always the exact final size.

Maybe is useful to make this change in the main branch.

Comments

yhager’s picture

Status: Active » Fixed

Thanks for the suggestion. committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.