Page 1 of 1

How to watermark an image?

Posted: Wed Oct 19, 2011 9:36 am
by keithglong
Hello All,

Would anyone have either an example stack or some code they could share that demonstrates an easy way put watermarks on images within LiveCode? I need to be able to take images of different sizes and place a small watermark at the bottom right corner of each image. Obviously, calculations will have to be made according to image size, etc., but I am only now exploring the image and graphics capabilities of LiveCode. I always learn best from examples, which is why I am posting this request... Hopefully someone out there has done this before.

Thanks!

- Boo

Re: How to watermark an image?

Posted: Wed Oct 19, 2011 11:43 am
by Klaus
Hi Keith,

what's the problem?

Since a "watermark" is "just" one (partly) transparent (PNG) image on top of another one***, I would do exactly that:
Put the "watermark" image (your logo or name or whatever) on top of another image :-D

If neccessary, you could then export a screenshot with these two images to get ONE image with a "watermark".

Or did I misunderstand your question?


Best

Klaus

Re: How to watermark an image?

Posted: Wed Oct 19, 2011 6:28 pm
by keithglong
Hi Klaus,

Thanks for your reply. In particular, I was hoping for an example to study. I need a way to put the watermark onto an image automatically without user intervention... I was hoping for an example showing some calculations on how to put a watermark onto the same place on each image automatically, with each image varying in size. Also, due to varying image sizes, the actual watermark would obviously need to vary in size proportionally too.

Examples are best for us newbies--we can learn so much from studying the code. In a nutshell, as a newbie, I could really use some help (and examples) with the aforementioned calculations.

Thanks,

- Boo

Re: How to watermark an image?

Posted: Sun Oct 23, 2011 12:02 am
by bn
Hi Keith/Boo,

I did a stack that watermarks an image. You type text, the text is converted to a png image and that is blended into an image as a watermark with transparency from 0 to 95. You can place the watermark topLeft/center/bottomright. (other locations easily added).

Have a look:
waterMarking-0.0.6.livecode.zip
(133.95 KiB) Downloaded 376 times
tell me what you think

Kind regards

Bernd

Re: How to watermark an image?

Posted: Sun Oct 23, 2011 2:10 am
by keithglong
Thanks Bernd (and I also appreciate the email)... Your example works great! 8-)