How to watermark an image?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
keithglong
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 348
Joined: Sun Jul 03, 2011 2:04 am

How to watermark an image?

Post by keithglong » Wed Oct 19, 2011 9:36 am

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

Klaus
Posts: 14193
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to watermark an image?

Post by Klaus » Wed Oct 19, 2011 11:43 am

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

keithglong
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 348
Joined: Sun Jul 03, 2011 2:04 am

Re: How to watermark an image?

Post by keithglong » Wed Oct 19, 2011 6:28 pm

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

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: How to watermark an image?

Post by bn » Sun Oct 23, 2011 12:02 am

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

keithglong
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 348
Joined: Sun Jul 03, 2011 2:04 am

Re: How to watermark an image?

Post by keithglong » Sun Oct 23, 2011 2:10 am

Thanks Bernd (and I also appreciate the email)... Your example works great! 8-)

Post Reply