PHP code example of bencagri / photon
1. Go to this page and download the library: Download bencagri/photon 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/ */
bencagri / photon example snippets
use Photon\Wrapper\Generate;
use Photon\Wrapper\Effect\Height;
use Photon\Wrapper\Effect\Width;
use Photon\Wrapper\Effects;
image.jpg';
//Generate image with your effects
$process = new Generate($imageUrl,$effects);
$process->process();
use Photon\Wrapper\Effect\Crop;
use Photon\Wrapper\Effect\Filter;
use Photon\Wrapper\Effects;
$crop = new Crop(500,250,330,300);
$effects = new Effects(
$crop,
new Filter('emboss')
);