Part of the EllisLab Network
   
 
Help with thumbnail generation
Posted: 14 July 2007 02:24 PM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  24
Joined  03-14-2007

I can’t seem to get the image_lib library to generate a thumbnail.  The following code generates an error message:

function test()
    
{
        
// Create thumbnail            
        
$config['image_library'] = 'GD';
        
$config['source_image'] = './public/images/avatars/brigham.jpg';
        
$config['create_thumb'] = TRUE;
        
$config['maintain_ratio'] = TRUE;
        
$config['width'] = 50;
        
$config['height'] = 50;
        
        
$this->load->library('image_lib', $config);
        
        
$this->image_lib->resize();
    
}

...and the error message is

A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI_Image_lib::$dest_image
Filename: libraries/Image_lib.php
Line Number: 476

What am I doing wrong?  I’ve tried specifying ‘dest_image’ and ‘new_image’ in the config file, but the same error appears.
Thanks,
Brigham

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120562 Total Logged-in Users: 33
Total Topics: 126613 Total Anonymous Users: 1
Total Replies: 665591 Total Guests: 299
Total Posts: 792204    
Members ( View Memberlist )