Welcome Guest, Not a member yet? Register   Sign In
Image library: resizing two or more images
#1

[eluser]tokyotech[/eluser]
I want to create two thumbnails from the same source image. The following code only makes my first thumbnail, but will not create the second one. Why is that? Is it because the config array is passed into the constructor and an object cannot be instantiated twice?

Code:
$config['image_library']  = 'gd2';
$config['source_image']   = $fullPath;
$config['create_thumb']   = true;
$config['maintain_ratio'] = true;
$config['width']          = 256;
$config['height']         = 256;
$config['master_dim']     = 'width';
$config['thumb_marker']   = IMAGE_LARGE;

$this->load->library('image_lib', $config);
$this->image_lib->resize();

$config['width']        = 128;
$config['height']       = 128;
$config['thumb_marker'] = IMAGE_SMALL;

$this->load->library('image_lib', $config);
$this->image_lib->resize();


Messages In This Thread
Image library: resizing two or more images - by El Forum - 11-27-2009, 10:14 PM
Image library: resizing two or more images - by El Forum - 11-28-2009, 11:34 AM
Image library: resizing two or more images - by El Forum - 11-28-2009, 01:00 PM
Image library: resizing two or more images - by El Forum - 11-28-2009, 02:42 PM
Image library: resizing two or more images - by El Forum - 11-28-2009, 02:55 PM
Image library: resizing two or more images - by El Forum - 11-28-2009, 03:01 PM
Image library: resizing two or more images - by El Forum - 11-28-2009, 03:35 PM
Image library: resizing two or more images - by El Forum - 04-09-2010, 09:44 AM
Image library: resizing two or more images - by El Forum - 04-09-2010, 09:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB