Reputation: 1
I want images at the size of 400 height, 800 width px,
if they're under the given size it'll error it out but if they are above (e.x 1200 width 900 height) I want it to crop the image on the center verticaly and horizontally and upload it with the cropped dimensions
some help would be appreciated, some code to give me the idea
Upvotes: 0
Views: 309
Reputation: 1198
This articles would help you to get started i think
PHP: Cropping a Rectangle Image to Square using GD
Resize an Image (on the fly) & Keep its Aspect Ratio using PHP and GD
Upvotes: 1