Skip to content

Instantly share code, notes, and snippets.

@govaniso
Created August 7, 2012 21:39
Show Gist options
  • Save govaniso/3289608 to your computer and use it in GitHub Desktop.
Save govaniso/3289608 to your computer and use it in GitHub Desktop.
Re dimensionar imagen
// *** Incluimos la clase
Load::lib("resize-class");
// *** 1) inicializamos la clase, e indicamos la imagen a tratar
$resizeObj = new resize('sample.jpg');
// *** 2) Establecemos el nuevo tamaño de la imagen (options: exact, portrait, landscape, auto, crop)
$resizeObj -> resizeImage(200, 200, 'crop');
// *** 3) Guardamos
$resizeObj -> saveImage('sample-resized.jpg', 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment