It's a CodeIgniter's library to create thumbnails on the fly. You don't have to worry about creating thumbs any more.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
libraries
README.md

README.md

#CodeIgniter - Img

Simple CodeIgniter library to generate high quality thumbnails


Hey everybody,

Library is based on excellent * Smarty plugin "Thumb" * created in 2005 by Christoph Erdmann.

My version is a little bit different, I'm using core from Thumb, and some modification which gives me more flexibility to work with it.

##DOCUMENTATION: Documentation is located at http://www.spidersoft.com.au/projects/codeigniter-img-thumbnails-on-the-fly/

##INSTALLATION: Upload img.php file to application/libraries/, upload config/img.php to application/config folder.

##USING THE LIBRARY:

Loading library

$this->load->library('img');

In view you can use function with this parameters:

echo $this->img->rimg('assets/img/image.jpg', array('longside' => 745, 'alt' => 'alt text')

##Parameters:

longside – width of longest side (pixel value),

shortside – width of shorter side

crop – cropping (true/false)

width – fixed width (with this parameter you need also set height)

height – height (with this parameter you need to also set height)

sharpen – sharp image after scale

nocache – rewrite existing file in the cache

frame - true / false (scale image to exact dimensions + create frame where proption is wrong)

r,g,b - colors for frame background

Feel free to send me an email if you have any problems.

Thanks,

Slawomir Jasinski

slav123@gmail.com

@slavomirj