2017 © Pedro Peláez
 

library simple-thumbnail

This class is designed to be a simple and lightweight way to create thumbnails.

image

simple-thumbnail/simple-thumbnail

This class is designed to be a simple and lightweight way to create thumbnails.

  • Saturday, December 28, 2013
  • by guilhermefarias
  • Repository
  • 3 Watchers
  • 1 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SimpleThumbnail

Simple and lightweight PHP Class to create thumbnails., (*1)

Getting Started

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

Methods

There are some methods that you must use to generate your thumbnail:, (*4)

  • setWidth(int $width)

Set width of thumbnail, parameter must be a integer value., (*5)

  • setHeight(int $height)

Set height of thumbnail, parameter must be a integer value., (*6)

  • setQuality(int $quality)

Set quality of thumbnail, parameter must be a integer value between 1 and 100.., (*7)

  • generate(string $sourceImage, string $thumbnailTarget)

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)

About

Its just a class who load original image and generate a thumbnail with a size and quality given., (*10)

Why?

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)

Who?

Created by Guilherme Farias, a web developer from Brazil., (*13)

License?

SimpleThumbnail is released under the terms of the MIT license., (*14)

The Versions

28/12 2013

dev-master

9999999-dev https://github.com/guilhermefarias/SimpleThumbnail

This class is designed to be a simple and lightweight way to create thumbnails.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by Guilherme Farias

image thumbnail thumb