PHP: Simple image resizer class

      No Comments on PHP: Simple image resizer class


I needed a flexible piece of code that could resize images so I came up with this. It takes a source filename, a destination filename, destination width and height, and the option to retain the image ratio. The code will figure out if it’s a PNG of JPEG based image based on the exif data of the image. There isn’t really much to talk about so here’s the sourcecode:

source of main class

File with instance of class


Leave a Reply