Skip to content

thayllonvictor/PHPThumb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHPThumb

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();

About

A simple class that uses the gd lib to cut and create thumbnails from images.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages