thayllonvictor / phpthumb
A simple class that uses the gd lib to cut and create thumbnails from images.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/thayllonvictor/phpthumb
Requires
- php: >=7.0
README
A simple class that uses the gd lib to cut and create thumbnails from images.
Installation
composer require thayllonvictor/phpthumb
Usage
// Create class PHPThumb $phpThumb = new PHPThumb(); // Set file imagem: upload file or path file $phpThumb->loadImage('example.jpg'); // Set width your thumbnail $phpThumb->thumbWidth('100'); // Set height yout thumbnail $phpThumb->thumbHeight('100'); // Set name image with a extension $phpThumb->setFileName('new-thumnail.png'); // Set dir save $phpThumb->savePath('thumbs/'); // Generate thumbnail $phpThumb->generateThumb();