Welcome Guest, Not a member yet? Register   Sign In
Image manipulation class - resizing of images
#3

[eluser]ravikota[/eluser]
function upload_photo()
{

$FilePath= 'FilePath';
$config['upload_path'] = './photo_uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '500';
$config['max_width'] = '1024';
$config['max_height'] = '1768';
$this->upload->initialize($config);

$fupload=$this->upload->do_upload($FilePath);
echo $this->upload->display_errors('<p>', '</p>');
$f=$this->upload->data();

if($fupload)
{
$config['image_library'] = 'GD';
$config['source_image'] ='./photo_uploads/'.$f['raw_name'].$f['file_ext'];
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = '100';
$config['height'] = '100';
$config['quality']='99';


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

$this->image_lib->resize();
echo $this->image_lib->display_errors();
}


The above is the function in my controller. The problem is that the image is resizing but the color is not maintained in the correct ratio. If any body have solution please let me know.


Messages In This Thread
Image manipulation class - resizing of images - by El Forum - 05-06-2008, 08:24 AM
Image manipulation class - resizing of images - by El Forum - 05-06-2008, 09:51 AM
Image manipulation class - resizing of images - by El Forum - 05-07-2008, 01:38 AM
Image manipulation class - resizing of images - by El Forum - 05-07-2008, 02:05 AM
Image manipulation class - resizing of images - by El Forum - 05-07-2008, 03:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB