A PHP Error was encountered

Severity: Warning

Message: Creating default object from empty value

Filename: libraries/MY_Controller.php

Line Number: 62

A PHP Error was encountered

Severity: Warning

Message: Creating default object from empty value

Filename: libraries/MY_Controller.php

Line Number: 71

A PHP Error was encountered

Severity: Warning

Message: Creating default object from empty value

Filename: libraries/sweetcron.php

Line Number: 236

CodeIgniter image resize and crop › Paul Bennett

CodeIgniter image resize and crop

Remember TimThumb from way back? After failing to find a good solution for CodeIgniter I've built a controller that wraps up the CI Image Manipulation lib, automatic cropping and caching which produces resized images in the correct ratio.

Installation

Copy the folders into your application directory. Then, modify config/thumb.php making sure to set the correct application and cache directories.

Usage

Usage is pretty simple, the image URL is formed like:

/thumb/view/w/{width}/h/{height}/c/{0 or 1}/src/{source}

Width (w), height (h) and crop (c) are optional, if any are omitted the default values will be used. The original image source is required and must come last in the URL. The source must be a relative URL with no leading slash, and is relative to the CI directory as defined in config/thumb.php.

An example image code looks like:

<img src="/thumb/view/w/640/h/480/src/images/example.jpg" alt="Example" />

Download

Download the latest version directly.

Reply to CodeIgniter image resize and crop

not found link!

Maybe this tutorial can help you it is a model where you have a choices how you will resize an image wither you crop, auto resize, landscape or portrait resize http://tutorials-edongkoy.blogspot.com/2012/04/resize-image-for-codeigniter.html

sorry, i try jpg image n it's work, nice work.....
thanks alot...

Message: getimagesize(D:/xampp/htdocs/ujian_ci/images/cache/bc9d90150ba97ad2714caebb959afed3) [function.getimagesize]: failed to open stream: No such file or directory

I should go to try it...

thank you

nice informative post, thanks for sharing.

nice, thanks for that.
I updated a couple of things to be used with 1.7.2, existing cache config and gif transparency.

sorry can't post the urls so you'll have to search for them

tried to post thanks but don't know if it's working

Hey, nice to see timthumb on igniter, im having issues with my folder paths i guess, always says image not found. Can you show me your folder setup and your config thumb.php?
Thanks alot nice work!