11-12-2009, 07:45 AM
[eluser]BrainCatcher[/eluser]
Hi there,
Got a problem with resizing images. When initiated the image_lib library with the config option 'create_thumb' set to 'true' it wordks like charm. But i don't need any thumbnails. Se when i do set the option 'create_thumb' to 'false' it doesn't make a neat resized image. It creates i big black area within the height and width of the original picture and in the upper left corner is the resized version of the picture. All in one picture.
The used format is an jpg.
Here's the code that initiates it from the controller:
Is there someone who can help me, with this? Otherwise i have to delete thumb pictures as well..
Grtz BrainCatcher
ps. Did i mentioned before?: U R Great!!
Hi there,
Got a problem with resizing images. When initiated the image_lib library with the config option 'create_thumb' set to 'true' it wordks like charm. But i don't need any thumbnails. Se when i do set the option 'create_thumb' to 'false' it doesn't make a neat resized image. It creates i big black area within the height and width of the original picture and in the upper left corner is the resized version of the picture. All in one picture.
The used format is an jpg.
Here's the code that initiates it from the controller:
Code:
$settings['maintain_ratio'] = TRUE;
$settings['image_library'] = 'gd2';
$settings['create_thumb'] = TRUE;
$settings['quality'] = '70%';
$settings['width'] = 100;
$settings['height'] = 100;
$settings['source_image'] = 'uploads/pasfoto/'.$filename['file_name'];
$this->load->library('image_lib', $settings);
$this->image_lib->resize();
if ( ! $this->image_lib->resize())
{
echo $this->image_lib->display_errors();
}else{
$this->personeel_model->save_cursist_pasfoto($id, $filename['file_name']);
}
Is there someone who can help me, with this? Otherwise i have to delete thumb pictures as well..
Grtz BrainCatcher
ps. Did i mentioned before?: U R Great!!