Skip to content

Edwin-Luijten/intervention-image-focus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intervention Image Focus Filter

Packagist Downloads CircleCI Code Climate maintainability

Example

Cropping images based on a focal point.

Requirements

Installation

composer require edwin-luijten/intervention-image-focus

Usage

use Intervention\Image\ImageManager;
use EdwinLuijten\InterventionImageFocus\FocusFilter;

$manager = new ImageManager();
$image = $manager->make('foo.png');

// x-y percentage
$image->filter(new FocusFilter(500, 500, '75-50')));

$image->encode('png');
$image->save('test.png');

Image attribution:
Title: Sunset city skyline
Author: Kevin Young @ Unsplash
Source: https://unsplash.com/photos/-icmOdYWXuQ

About

Cropping images based on a focal point.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages