class.upload.php manipulates uploads and images very easily. It can convert and resize uploaded images in many ways. It uses the GD library.
How does it work?
- the class constructor upload handles a uploaded file (it can also handle a local file)
some optional parameters can be set up to act on the file during the process
- the process is called with as an argument the destination directory on the server. If some parameters have been set up, the class will rename, resize, convert files and images
- when the uploaded file is not needed anymore, we can delete it using clean.
Why use this class?
- with one uploaded file, you can do as many copies, convertions, resizing you want.
- you can resize each image dimension, or both, keeping the image ratio or not.
- you can choose to resize an image only if it is bigger -or smaller- than the wanted sizes
- you can manipulate the image in many ways, play with colors, add labels and watermarks...
- its use is simplistic but powerful
- a lot of variables are set up during the process. You can retrieve all these values after a process.
- error messages are understandable, and a variable log allows you to see what the class does.
- it is already widely used on Internet
- it is free
What's New in This Release: [ read full changelog ]
· This version adds full support for XMLHttpRequest uploads, the ability to pixelate images, and many small fixes.