[eluser]@li[/eluser]
I'm trying to use the codeigniter image manipulation class to watermark uploaded images. What I want to do is have the logo image of the site watermarked to the bottom right of the image. This is what my config array looks like: (output of a print_r)
Code:
(
[source_image] => /home/xx/xxx/xxxx/upload/5ea4f1a7c980e1ce8fa58c989337c674.jpg
[new_image] => /home/xx/xxx/xxxx/upload/w_5ea4f1a7c980e1ce8fa58c989337c674.jpg
[wm_type] => overlay
[wm_overlay_path] => /home/xx/xxx/yyy/images/appmark.png
)
My code is:
Code:
$this->image_lib->initialize($config);
if (! $this->image_lib->watermark())
{
echo $this->image_lib->display_errors();
return false;
}
When I run this, no errors are created. A file 'w_5ea4f1a7c980e1ce8fa58c989337c674.jpg' is created in the location I want, however it doesn't contain the watermark image on it, and is simply a carbon copy of the source_image. What can I be doing wrong?
Any help with this would be very appreciated!