CodeIgniter Forums
upload resize and watermarking in one time - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: upload resize and watermarking in one time (/thread-56577.html)



upload resize and watermarking in one time - El Forum - 01-03-2013

[eluser]ranggadablues[/eluser]
Hi there, I create for upload image and I want it will resize and watermarking the image in one time but it's always fail here's the code
Code:
// resize
            $img['quality']      = '100%' ;
            $img['source_image'] = $source ;
            $img['new_image']    = $destination_medium ;
            $this->image_lib->initialize($img);
            $this->image_lib->resize();
            $this->image_lib->clear() ;
            unset($img);
            
            //watermark
            $img['source_image'] = $source ;
            $img['new_image']    = $destination_medium ;
            $img['wm_text'] = 'digitalphoto.com';
            $img['wm_type'] = 'text';
            $img['wm_font_path'] = './system/fonts/helvetica.ttf';
            $img['wm_font_size'] = '20';
            $img['wm_font_color'] = 'ffffff';
            $img['wm_vrt_alignment'] = 'midle';
            $img['wm_hor_alignment'] = 'center';
            $this->image_lib->initialize($img);
            $this->image_lib->watermark();            
            $this->image_lib->clear() ;
            unset($img);
I try with
Code:
$this->image_lib->display_errors()
the code not found the errors. I already search from google and this forum that I cannot find the answer. Is this some kind a bug?

thanks in advance