ElkArte Community

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

Title: Watermark - what does it take?
Post by: badmonkey on January 05, 2020, 11:42:33 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!
Title: Re: Watermark - what does it take?
Post by: Spuds on January 05, 2020, 02: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, 02:47:35 pm
Quote from: Spuds – 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, 03: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 11, 2020, 08:31:39 pm
Quote from: badmonkey – 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 11, 2020, 09:38:48 pm
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!