Page 1 of 1
Watermarking images on the fly
Posted: Mon Apr 26, 2010 5:31 am
by leo
Hi All,
I would like to watermark images on the fly with this:
http://bokehman.com/watermark
Where to put the watermark function? Into the library/image/image.php or catalog/controller/product.php?
I have tried the product.php, it creates the watermarked image but only this image is visible on the site, no other content.
Could somebody put me in the right direction?
br
Leo
Re: Watermarking images on the fly
Posted: Mon Apr 26, 2010 6:49 am
by Brent
It needs to be done in library/image/image.php
You have to do it after the image is re-sized.
I looked at this, but needed a way to cache the results and never got back to it.
If you do it after the image is re-sized, I think it will have to be recreated every time the image is requested.
Try it and let me know how it works out and how it affects page load time.
Re: Watermarking images on the fly
Posted: Wed Apr 28, 2010 11:57 am
by leo
I decided to watermark the images during the image upload process, so i modified the library/image/image.php.
When I upload an image a 40x40 watermarked image appears under the /cache directory. The other resized images will be created if they are needed (automatically). Works fine.
Unfortunately the original uploaded image is not watermarked, so that nor the popup image. Any idea? Where can I "catch" this image?
Another question: is it possible to protect/hide the image folder? So, no direct links to images.
br
Leo
Re: Watermarking images on the fly
Posted: Wed Apr 28, 2010 1:32 pm
by Brent
Another question: is it possible to protect/hide the image folder? So, no direct links to images.
No. Your image links would be no good then.
If your idea is to do a permanent water mark to prevent copy-write infringement, I think doing it on the uploaded image might be the best result.
Then your full size image and all the re-sized images would have the same water mark to scale.
Either that, or water mark images before upload.
Re: Watermarking images on the fly
Posted: Thu Apr 29, 2010 1:37 am
by leo
I modified the admin/controller/image.php. After uploading the origonal file, it will be watermarked permanently.
It works fine.
Thanks.
Leo
Re: Watermarking images on the fly
Posted: Thu Apr 29, 2010 6:36 am
by Brent
If you want to share your code, I could put in the next release.
Re: Watermarking images on the fly
Posted: Thu Apr 29, 2010 12:10 pm
by leo
I am going to test it and will share the code.
Re: Watermarking images on the fly
Posted: Wed Aug 10, 2011 6:06 am
by Creater
I also interested in watermark my images. Will you please share the code with us?
Re: Watermarking images on the fly
Posted: Wed Aug 10, 2011 6:09 am
by Creater
I have one more question. Is watermarked images are cached or not?
Re: Watermarking images on the fly
Posted: Wed Aug 10, 2011 6:18 am
by leo
I will add it to the core soon. The images are cached.