Dynamic watermark inside a jpeg

No, not secret CIA crap.. but just about as tough to crack for most of us. He's got it all, css, html, xhtml, php.. you name it!

Moderator: Zorro

Dynamic watermark inside a jpeg

Postby BlackCat » September 13th, 2013, 1:31 am

I noticed something very new and mysterious to me the other week. I found an image from a website that whenever you'd refresh it, that is, refreshing the direct link with the .jpeg file extension, the watermark would move!!! How is this possible on a jpeg? What is commanding the watermark to move after refreshing and/or accessing the image URL?

I am totally lost as to how the developer(s) accomplished this.
User avatar
BlackCat
 
Posts: 1674
Joined: February 12th, 2011, 12:05 pm

Re: Dynamic watermark inside a jpeg

Postby Zorro » September 13th, 2013, 3:12 am

In this case, the developer has setup some code that:

1. Loads original image into a cache directory or into system memory on the server.
2. Dynamically adds a watermark to the original image.
3. Sends new watermarked image to browser.
4. Deletes new watermarked image from cache directory (keeping the original) or flushes it from system memory.

This is quite simple actually and is very similar to dynamic thumbnail image generators. Thumbnail generators will generate a thumbnail of a specified image based upon some pixel size parameters passed in the URL and then store the thumbnail in a cache directory; it's cached so the server doesn't waste CPU resources re-sizing the original image each time that particular thumbnail size is requested.
Research shows that one in three Clinton supporters are just as stupid as the other two.
Zorro
Squad Member
 
Posts: 543
Joined: February 5th, 2011, 12:25 pm

Re: Dynamic watermark inside a jpeg

Postby BlackCat » September 13th, 2013, 11:32 pm

Wow, great information. Thanks for taking the time to explain this to me. I'm going to try and accomplish this. :) Thank you!
User avatar
BlackCat
 
Posts: 1674
Joined: February 12th, 2011, 12:05 pm


Return to El Zorro's casa de la Codes

Who is online

Users browsing this forum: No registered users and 30 guests

cron