PHP code example of wangjingchun / image-editor

1. Go to this page and download the library: Download wangjingchun/image-editor 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/ */

    

wangjingchun / image-editor example snippets


use wangjingchun\ImageEditor;

$newImage = ImageEditor::resizeExact($basepath, $image, $width, $height);

use wangjingchun\ImageEditor;

$newImage = ImageEditor::resizeExactHeight($basepath, $image, $height);

use wangjingchun\ImageEditor;

$newImage = ImageEditor::resizeExactWidth($basepath, $image, $width);

use wangjingchun\ImageEditor;

$newImage = ImageEditor::resizeFill($basepath, $image, $width, $height);

use wangjingchun\ImageEditor;

$newImage = ImageEditor::resizeFit($basepath, $image, $width, $height);