File component
getImageSize($src)
Get the dimensions of an image file, results are cached in the array and are indexed by . You can retrieve the values of an image from this array at any future time within the instance. Return is an array on success, Boolean false on failure.
getImageFormat($src)
Get the format (gif, jpeg, etc.) of an image file. Return is a string for standard image types, int for non-standard, boolean false on failure.
isInvalidUpload($id, $imagesOnly = false)
Checks if an uploaded file has or has not been successfully uploaded and is in the expected format. Returns Boolean false if valid, error message string if invalid.
uploadFile($id, $destination, $imagesOnly = false)
Validates and then moves a file that was uploaded from a form. Returns Boolean false on success, an error message string on failure.
resizeImage(array $specs, $src = null)
Resizes an image or generates a set of resized images, optionally adding a watermark to any of them.
Requires the PHP GD extension to be enabled.
array keys:
- required, if constrain is true then this becomes the maximum width- required, if constrain is true then this becomes the maximum height- (boolean) default is true - resize the image proportionally, if false the end image may be stretched- (boolean) default is true - if true the end image can only be reduced, never be enlarged (which usually degrades quality)- folder where to output the file, if omitted the system default will be used- filename, if omitted the source filename will be used- array with keys:- required, the path to the watermark image file- Optional, default if omitted is 14
You can also specify generation of multiple output files by setting specs to an array of , eg.:
if the argument is omitted then the last file added to will be used, if none exists then this method will exit and return false


