• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
image resizing pblm

#1
[eluser]mahins area[/eluser]
hi i want to resize my omage into two diemsions.(100*100)(400*400)


for that i used

//======================================================================Create thumbnails====================================================//
$thumbname=$data['upload_data']['full_path'];
$config['image_library'] = 'gd2';
$config['source_image'] = $thumbname;
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 105;
$config['height'] =100;
$this->load->library('Image_lib', $config);

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

unset($config);
$this->image_lib->clear();
//================================================End of Thumb Creation===================================================================//



//======================================================================Create thumbnails====================================================//
$thumbname=$data['upload_data']['full_path'];
$config['image_library'] = 'gd2';
$config['source_image'] = $thumbname;
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 400;
$config['height'] =400;
$this->load->library('Image_lib', $config);

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

unset($config);
$this->image_lib->clear();
//================================================End of Thumb Creation===================================================================//


















Thins are ok with first thumbnail.that is i got a thumnail with 100*100

but i didint get a thumnail with 400*400.


Can we create many thumbnails of same image ?please reply!thanks in advace


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.