i’m familiar with resizing and cropping images under php using imagecopyresampled but now i’m having a special problem:
the task is cropping a large image from eg. 1600×1200 to 500×120, which means resizing down to 500px and crop its height that it’S 120px. is there some easy way or do i need to calculate the cropping values all on my own? thanks
i’m familiar with resizing and cropping images under php using imagecopyresampled but now i’m
Share
There is PHP library that could help you out called PHPThumb. You can find here https://github.com/masterexploder/PHPThumb
They have an adaptive resize method that does what you’re looking for. https://github.com/masterexploder/PHPThumb/wiki/Basic-Usage