Welcome Guest, Not a member yet? Register   Sign In
Thumnail/blur image
#1

Hi To all
.. I am Convert the Base64 encoded string into image .It is done. after that Image Stored In server ... After Converting the image .. I want To create the blur image And Thumbnail for that Server Path Image.. And that blue /thumnail Images Stored in to server again .. I am Wring The Code . but its Not Working .. Please Check My Code .. And give Your Valuable Suggestions Thanks


$image_string = $this->post('image_string');
$image_name = date('d-m-yh:iConfused').'.jpg';
header('Content-type : bitmap; charset=utf8');
$decoded_string_image = base64_decode($image_string);
$path1 = FCPATH.'assets/chat_posts/'.$image_name;
$file1 = fopen($path1,'wb');
$is_written = fwrite($file1, $decoded_string_image);
fclose($file);
if($is_written>0)
{
$source_path = base_url().'assets/chat_posts/'.$image_name;
$target_path = FCPATH.'assets/localposts_string_check/'.$image_name;

$this->load->library('image_lib');
$config['image_library'] = 'gd2';
$config['source_image'] = $source_path;
$config['create_thumb'] = TRUE;
$config['maintian_ratio'] = TRUE;
$config['width'] = 100;
$config['height'] = 100;
$config['new_image'] = $target_path;
$this->load->library('image_lib', $config);
$this->image_lib->resize();


}

Attached Files Thumbnail(s)
   
Manikanta
Reply


Messages In This Thread
Thumnail/blur image - by Chandini - 02-10-2016, 11:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB