54
rated 0 times
[
55]
[
1]
/ answers: 1 / hits: 20154
/ 8 Years ago, mon, august 1, 2016, 12:00:00
I'm using angularJS and need to apply a watermark programatelly in images by calling an JS function. What I have is:
<figure><img class=watermark ng-src={{applyWatermark(img.url)}}></figure>
So, I need to call that function applyWatermark (not implemented yet) and return a img with the watermark, but I'm not sure how can I build this function. Should it return the image? Can someone provide me some example how can I do this?
EDIT:
I did this, but it's not working:
$(function applyWatermark(image) {
watermark([image, 'watermark.png'])
.image(watermark.image.lowerRight())
.then(function (img) {
return img
});
})
Any idea?
More From » javascript