PHP code example of jpeer / lumen-image

1. Go to this page and download the library: Download jpeer/lumen-image library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jpeer / lumen-image example snippets


Image::url('/uploads/photo.jpg',300,300,array('crop','grayscale'));

Image::make('uploads/photo.jpg',array(
	'width' => 300,
	'height' => 300,
	'grayscale' => true
))->save('path/to/the/thumbnail.jpg');

$thumbnail = Image::open('uploads/photo.jpg')
			->thumbnail(new Imagine\Image\Box(300,300));

$thumbnail->effects()->grayscale();
	
$thumbnail->save('path/to/the/thumbnail.jpg');
html
<img src="<?=Image::url('/uploads/photo.jpg',300,300,array('crop','grayscale'))