Based on Image_Toolbox by Martin Theimer https://sourceforge.net/projects/image-toolbox/
Main functions:
- Convert to JPEG
- Make thumbnail
- Make thumbnail box
- Make thumbnails with aspect ratio
- Image cropping
- Blend watermarks
Upload as JPEG
$img = new Image_Toolbox( $_FILES['file']['tmp_name'] );
$img->save( '/tmp/destination.file', 'jpg');
Make thumb
$img = new Image_Toolbox( $_FILES['file']['tmp_name'] );
$img->newOutputSize( 100, 100, 4 );
$img->save( '/tmp/destination.file' );
Make thumb (aspect ratio)
$img = new Image_Toolbox( $_FILES['file']['tmp_name'] );
$img->newOutputSize( 100, 0, 4 );
$img->save( '/tmp/destination.file' );
Make thumb (merge center)
$img = new Image_Toolbox( $_FILES['file']['tmp_name'] );
$img->newOutputSize( 100, 0, 1 );
$img->save( '/tmp/destination.file' );