8000 GitHub - artem-popov/thumb: Mini library for creating thumbs · GitHub
[go: up one dir, main page]

Skip to content
artem-popovPublic

About

Mini library for creating thumbs

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thumb

Mini library for creating thumbs.

1. Getting started

The library allows you to resize images by setting either the width or the height of the resulting thumb. The other dimension will be determined authomatically to preserve the ratio.

use \thumb\Thumb;

$img = new Thumb("image.jpg");

/** 
 * The following will create thumbsFolder/image.jpg
 * with a width of 300 and a proportional height.
 */
$img->create(300, "thumbsFolder");

/** 
 * The following will create thumbsFolder/thumbName.jpg
 * with a width of 300 and a proportional height.
 */
$img->create(300, "thumbsFolder", "thumbName.jpg", Thumb::WIDTH);

/** 
 * The following will create thumbsFolder/thumbName.jpg
 * with a height of 300 and a proportional width.
 */
$img->create(300, "thumbsFolder", "thumbName.jpg", Thumb::HEIGHT);

/** 
 * The following will create thumbsFolder/image.jpg
 * with a height of 300 and a proportional width.
 */
$img->create(300, "thumbsFolder", null, Thumb::HEIGHT);

2. Image types

The lib only supports jpg, gif and png files.

3. Bugs and dubts

Any doubts just send me an email at ftestolin(at)gmail.com

About

Mini library for creating thumbs

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0