Skip to content

Instantly share code, notes, and snippets.

View arnold-almeida's full-sized avatar
💀
Based

Arnold A arnold-almeida

💀
Based
View GitHub Profile
/**
* @param $file Path to source file
* @param $dest Path to save the image
* @param $type Method of resizing ('resize', 'resizemin', 'resizecrop', 'crop')
* @param $size Dimensions, array of width and height or maxScale
* @param $output Type of file to save it as ('jpg', 'png', 'gif')
* @param $quality 0 < x < 100
*/
function image ($file, $dest, $type, $size, $output = NULL, $quality = NULL, &$error = '') {