Work Project

PHP CropResizer class

  • 2016-07-10

Work Description

CropResizer is a php class written for our project to resize and crop images which's supporting bmp, gif, jpg and png format. Right now it's released as open source class with demo example and available in GitHub.

Live Preview Github Button

Update History

  • 2016-09-14 - Bug fixing and add crop cases
    • Removed duplicated switch statement which make the script can't run.
    • Add the case if selected crop-area bigger then the maximum x or y-coordinate of source image, cut overflowed crop area and keep cropped image ratio same as required ratio.

  • 2016-07-11 - Fix bugs and update: Update incorrect formula to resize image by height
    • Add support to handle gif and png images.
    • Update incorrect formula to resize image by height:
      • If source image's height bigger than width, correct the wrong width.

View more Works