Final cropped image doesn't have always the exact width and height
joanpc - October 30, 2009 - 01:11
| Project: | Imagefield Crop |
| Version: | 6.x-1.0-beta3 |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
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.

#1
Thanks for the suggestion. committed.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.