求助:图片先 生成缩略图后打水印确不能成功
本帖最后由 guowenlong111 于 2011-1-10 20:11 编辑求助: 图片处理先打水印后生成缩略图可以,先生成缩略图后打水印确不能成功(生成缩略图成功 ,确看不见水印)什么原因啊?代码如下:
function water_mark($furl=""){
$config['source_image'] = $furl;
$config['wm_type'] = 'overlay';
$config['wm_vrt_alignment']="bottom";
$config['wm_hor_alignment']="right";
$config['wm_overlay_path'] = 'publish/images/y_logo.png';
$this->image_lib->initialize($config);
$this->image_lib->watermark();
$this->image_lib->clear();
}
function thumb($furl,$width=125,$height=163,$new_img=""){
$config['image_library'] = 'gd2';
$config['source_image'] =$furl;
$config['new_image'] = $furl.'.thumb.jpg';
$config['width'] = $width;
$config['height'] = $height;
$this->image_lib->initialize($config);
$this->image_lib->resize();
$this->image_lib->clear();
}
/*先生成水印再生成缩略图可以成功*/
//$this->water_mark($row);
//$this->thumb($row);
$this->thumb($row);
$this->water_mark($row);//不能看到水印啊,求解?
老问题,看这里:http://codeigniter.org.cn/forums/thread-4518-1-1.html
建议多看 FAQ 感谢回复,我已经按照上面说的方法修改了,但还是没有解决 ,当我先调用生成水印的那个函数再调用生成缩略图函数 可以看到水印和缩略图 ,但当我先调用生成缩略图函数 再调用生成水印函数能看到缩略图 确不能看到水印,:L 都是操作的同一个文件,所以后面的会覆盖前面。
操作完了复制一份,再做其他操作。 怎么复制?
页:
[1]