How in the world - Watermarking |
[eluser]Medikal[/eluser]
I've looked at the library, and I still can't figure out how in the world I can produce an image in my view, with text on it from a database value. My main question is where I store the function to grab the value, where I write it to the picture, and how I display the manipulated picture in the view. No resizing, cropping, nothing, only watermarking a number on an image. Thank you.
[eluser]cereal[/eluser]
You can create a controller that would select the image from an image_list table through the id, something like this: http://your.server/image/1 the controller will be: Code: <?php In order to display the image write: Code: <img src="http://your.server/image/1" />
[eluser]Medikal[/eluser]
Right, didn't explain enough -- so for example I'm just using this for integers, it will have integers overlay the image (imagine the digg buttons). So I want the image url to be mysite.com/image/1 or mysite.com/image/4376. So I setup my controller like so Code: function index($id) However, that completely errors out.
[eluser]cereal[/eluser]
This is strange, it works fine for me. Add this: Code: if ( !$this->image_lib->watermark()) Or if you are routing remove $id from index() and set $this->uri->segment(3) on wm_text. |
Welcome Guest, Not a member yet? Register Sign In |