ElkArte Community

Project Support => General ElkArte discussions => Topic started by: badmonkey on January 05, 2020, 05:42:33 pm

Title: Watermark - what does it take?
Post by: badmonkey on January 05, 2020, 05:42:33 pm
Without going as elegant as a full on mod, or perhaps so, what code would be required in EA to use a simple png image to watermark attachments? Thanks for your thoughts!
Title: Re: Watermark - what does it take?
Post by: Spuds on January 05, 2020, 08:15:22 pm
Do you use imagick or GD for your graphics ?

ETA:  There are also a couple of good nginx modules that will let you add a watermark based off if the image is > a certain pixel size, that would be pretty easy to add and avoid thumbnails, icons and the like.
Title: Re: Watermark - what does it take?
Post by: badmonkey on January 05, 2020, 08:47:35 pm
Do you use imagick or GD for your graphics ?

ETA:  There are also a couple of good nginx modules that will let you add a watermark based off if the image is > a certain pixel size, that would be pretty easy to add and avoid thumbnails, icons and the like.
 
 Yes. The server has both installed actually. 

I tried the nginx approach. The trouble stemmed from the file extensions. Nginx didn't like, or I couldn't properly configure it to do so, .elk or just "image".  Serving a normal jpg produced a working watermark, so the module was validated. Would be cool to make it work that way. Do you have ideas or advice to make that work? 
Title: Re: Watermark - what does it take?
Post by: Spuds on January 05, 2020, 09:02:13 pm
I've not tried it with Elk ... I'll have to give it a whirl on my test site and see what it breaks !
Title: Re: Watermark - what does it take?
Post by: Spuds on January 12, 2020, 02:31:39 am
Without going as elegant as a full on mod, or perhaps so, what code would be required in EA to use a simple png image to watermark attachments? Thanks for your thoughts!
https://www.elkarte.net/community/index.php?topic=5741 .. Its a full addon but I left out the elegant part ;)

Due to the way attachments are handled, I could not come up with a way to have nginx do the work for us, so you instead get this addon! ... Its 1.1 and Imagick only.  So kick the tires and let me know what is not working ... I think the text watermark is pretty cool, but maybe thats just because I got it working on my local.
Title: Re: Watermark - what does it take?
Post by: badmonkey on January 12, 2020, 03:38:48 am
Just when we think you da man - you go and outdo yourself! Many, many, many thanks! I'll give it and go. Feedback to come!