Welcome Guest, Not a member yet? Register   Sign In
image_lib watermarking - view part
#11

[eluser]Cristian Gilè[/eluser]
There is a path problem.

Where
Code:
/banner/images/banner.png
is located? At the same level of index.php?

Cristian Gilè
#12

[eluser]Casperlarsen94[/eluser]
in the htdocs folder in MAMP, theres is a folder called banner which is my application.
And the images is located in the root of the banner folder.
#13

[eluser]Cristian Gilè[/eluser]
Code:
$this->image_lib->watermark();
return boolean TRUE upon success and FALSE for failure. If it fails you can retrieve the error message using this function:

Code:
$this->image_lib->display_errors();

So, to debug image processing use:

Code:
if( ! $this->image_lib->watermark())
    echo $this->image_lib->display_errors();

To make a test, put the images folder at the same level of the index.php file and place a dot in front of the source_image path.

Code:
$config['source_image']    = './images/banner.png';

In the view show the image with:
Code:
<img src='http://localhost:8888/images/banner.png' alt='Banner' />

Cristian Gilè
#14

[eluser]Casperlarsen94[/eluser]
Thank you very much! Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB