Forum Moderators: phranque

Message Too Old, No Replies

Image save/view watermarking

How to replicate neat trick seen on national geographic site?

         

nudave

3:22 pm on Aug 19, 2009 (gmt 0)

10+ Year Member



Looking at the now-famous picture of a squirrel that investigated a camera on auto-timer, I noticed something cool that National Geographic did with their pictures.

Go to [photography.nationalgeographic.com ], and you will see the picture w/o a watermark. Attempt to view the image by itself or save it, and you get a watermarked version.

I've been trying to duplicate this on my site, to no avail. So far, through the use of .htaccess and php, I have all of my photos served through a php script that checks the referrer. If you are coming from my site, you get a clean image with Cache-control set to no-cache and Expires at -1. If you aren't, you get a watermarked image.

<snip> The direct link has a watermark, while the inline doesn't.

But, when you right click/view image from the inline page, you get the non-watermarked image, even if you refresh (only if you then click in the address bar and press enter do you get the non-watermark). What this tells me is that when you right click/view or save, the browser passes the current page as the referrer.

So, what is national geographic relying on besides the referrer to pull off this trick? Any ideas?

[edited by: jdMorgan at 4:21 am (utc) on Aug. 20, 2009]
[edit reason] No URLs, please. See TOS. [/edit]

wilderness

7:49 pm on Aug 19, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The displayed image is cropped (look at the distance from the bottom of the squirrels feet to the frame edge) to hide the portion of the image that contains the watermark.

It would be a nightmare to accomplish this on images which are all "different sizes", requiring manual editing of each image and then defining seperate cropped dimensions in your displayed image.