无法在Codeigniter图像库中获取水印

时间:2014-09-07 19:28:50

标签: codeigniter image-processing

它在Codeigniter中不起作用我错了什么?

$image_cfg = array();
                        $image_cfg['image_library'] = 'GD2';
                        $image_cfg['source_image'] = '../public_html/images/employee/'.$new_name; 
                        $image_cfg['wm_text'] = 'Copyright 2006 - John Doe';
                        $image_cfg['wm_type'] = 'text';
                        $image_cfg['wm_font_path'] = '../system/fonts/texb.ttf';
                        $image_cfg['wm_font_size']  = '16';
                        $image_cfg['wm_font_color'] = 'ffffff';
                        $image_cfg['wm_vrt_alignment'] = 'bottom';
                        $image_cfg['wm_hor_alignment'] = 'center';
                        $image_cfg['wm_padding'] = '20'; 
                        $this->load->library('image_lib', $config);
                        $this->image_lib->initialize($image_cfg);
                        $this->image_lib->watermark();

对我来说,调整大小和图像叠加是有用的但是上面的这个对我不起作用

感谢您的帮助

0 个答案:

没有答案