i am uploading an image using CI upload library work fine, problem with watermarking and image thumbnail, if id do watermarking first and then thumbnail, its doing watermarking to original image but also re-sized it thumbnail size but not keeping original size image with watermark too, if i do thumbnail first then watermark it work fine but i want thumbnail also watermarked here is my code
$this->do_thumb('file_name');
$this->watermark('file_name');
function watermark($filename){
$image_cfg = array();
$image_cfg['image_library'] = 'GD2';
$image_cfg['source_image'] = 'upload/' . $filename;
$image_cfg['wm_overlay_path'] = 'upload/watermark.png';
$image_cfg['new_image'] = 'upload/mark_'.$filename;
$image_cfg['wm_type'] = 'overlay';
$image_cfg['wm_opacity'] = '10';
$image_cfg['wm_vrt_alignment'] = 'bottom';
$image_cfg['wm_hor_alignment'] = 'right';
$image_cfg['create_thumb'] = FALSE;
$this->image_lib->initialize($image_cfg);
$this->image_lib->watermark();
$this->image_lib->clear();
// echo $this->image_lib->display_errors();
// die();
}
function do_thumb($filename) {
$image_cfg['image_library'] = 'GD2';
$image_cfg['source_image'] = 'upload/' . $filename;
$image_cfg['create_thumb'] = TRUE;
$image_cfg['maintain_ratio'] = TRUE;
$image_cfg['width'] = '200';
$image_cfg['height'] = '175';
$this->load->library('image_lib');
$this->image_lib->initialize($image_cfg);
$this->image_lib->resize();
$this->image_lib->clear();
}