Hi good afternoon,
I have a GIF on my screen based in an external URL and I want to add a watermarker. I'm trying to use your plugin, can you give me a help?
Thanks,Daniel Nogueira
Hi Daniel,
From extrenal url you need to get Image Binary and convert it to base64 and set to image canvas and then pass to javascript code with the name you want as a water mark.
Thanks,
Dileep
Is not possible to pass an image as watermarker? I've already has my binary data and now I want to pass an image as watermarker...
Hi Daniel, did you mean you want to add an image as a watermark?
Yes! Exactly...
Hi Daniel, I think it's possible to add an image as a watermark but I don't know if it will work or not with gif source
Ok, but to know, I need to try this...first of all, I need to understand the parameters that should I pass to the JavaScript.I need to give a timestamp (i'm using CurrDateTime()) and one Id (I need to know what should I use here).
if you want to give a timestamp, fill Timestamps input parameter using builtin function OutSystems and Id param is id given from image widget for preview
Hi Daniel Nogueira, to add an image as a watermark you just change js add watermark to this
Using the path to add an image as a watermark, for this example, I'm using a base64 image as a watermark. marked as a solution if this step is working for you. thanks
Hi Ryan, thanks for your reply, but it doesn't work yet.
For example:
I have 2 containers in my screen.
The first has my gif with an external URL.
The second one, with an image that I want to use as watermark.
This is my OnInitialize event:
My first step is convert a html block to binary data, so, I convert the image that I want to use as watermark. After that, I convert the image (binary data) to base64 and then, I'm trying to add watermark as you explain...
The first has my gif with an external URL. - this images is a base image
The second one, with an image that I want to use as watermark. - the second one, convert to base64 and add to input parameter JSmy js is getting your image source from the first container using jquery to get image source and adding watermark using the second one
This is exactly what I'm doing...I'm converting the second image to base64 and then, I'm passing it as input parameter on your JS.
can you share .Oml ?
Of course... I changed my solution. I create a screen just to do an upload of the image desired to be a watermark and save it on database, and in my other screen, I just convert the image to base64 and then, try to add as watermark.Here's my example. Now, i'm taking '$ is not defined'.
1. after I check your oml , I found your base64 does not include"data:image/jpeg;base64," at the beginning. so the image your convert from server action not load.2. your screen must contain these required scripts
I don't know where should I add "data:image/jpeg;base64,".
Here is my .oml modified.
input parameter to js : "data:image/jpeg;base64," + (output from binarytobase64)
"Cannot read property 'search' of undefined". This is the message received when I try it.
Hi Daniel, it's because your file is not formatted as base64 (png|jpg|jpeg|gif).not only the watermark image, the original picture need to be convert to base 64 image
use below forge component for watermark
https://www.outsystems.com/forge/component-overview/1819/pdf-helper
Hi, thanks for your reply, but in this case, this component is just available for traditional web (I need to use on mobile) and it doesn't work to add image as watermarker, just a text.
To add a watermark to a GIF displayed on your screen from an external URL, you can use a graphics editing software like Photoshop. First, download the GIF to your computer. Then, open it in Photoshop, add your watermark (text or image), and save the file with the watermark. Make sure the water mark is visible but doesn't detract from the original content.