dev-master
9999999-dev https://github.com/guilhermefarias/SimpleThumbnailThis class is designed to be a simple and lightweight way to create thumbnails.
MIT
The Requires
- php >=5.3
by Guilherme Farias
image thumbnail thumb
Wallogit.com
2017 © Pedro Peláez
This class is designed to be a simple and lightweight way to create thumbnails.
Simple and lightweight PHP Class to create thumbnails., (*1)
Import the class, (*2)
include 'SimpleThumbnail.php';
Instance the class, configure size, load image source and set name of thumbnail, (*3)
$simpleThumbnail = new SimpleThumbnail;
$simpleThumbnail->setWidth(250);
$simpleThumbnail->setHeight(250);
$simpleThumbnail->setQuality(100);
$simpleThumbnail->generate("image.png", "thumb.jpg");
There are some methods that you must use to generate your thumbnail:, (*4)
Set width of thumbnail, parameter must be a integer value., (*5)
Set height of thumbnail, parameter must be a integer value., (*6)
Set quality of thumbnail, parameter must be a integer value between 1 and 100.., (*7)
This method will load original image from a source path given as string on the first parameter and will generate a thumbnail with the size and quality given on settings methods., (*8)
The Thumbnail will be saved on the path passed as string on the second parameter., (*9)
Its just a class who load original image and generate a thumbnail with a size and quality given., (*10)
This class is designed to be a simple and lightweight way to create thumbnails., (*11)
The idea came from my need to generate thumbnails and many classes that I found on the internet had several features that are not necessary to generate a simple thumbnail., (*12)
Created by Guilherme Farias, a web developer from Brazil., (*13)
SimpleThumbnail is released under the terms of the MIT license., (*14)
This class is designed to be a simple and lightweight way to create thumbnails.
MIT
image thumbnail thumb