On Fri, 2010-09-17 at 18:56 -0400, TR Shaw wrote: > On Sep 17, 2010, at 6:49 PM, Ashley Sheridan wrote: > > > On Fri, 2010-09-17 at 18:41 -0400, TR Shaw wrote: > > > >> Gary > >> > >> you do realize that if you display the image in a browser without the watermark, simple drag and drop can copy the image as is (eg without the watermark) > >> > >> Tom > >> > >> On Sep 17, 2010, at 6:21 PM, Gary wrote: > >> > >>> > >>> ""Gary"" <gpaul@xxxxxxxxxxxxxxxx> wrote in message > >>> news:1F.27.30333.1D5E39C4@xxxxxxxxxxxxxxx > >>>> Is there a way to insert a watermark on an image as it is being uploaded > >>>> to the image file, then removed when it is called from a database to be > >>>> viewed on a website? > >>>> > >>>> The rational behind this is I have a photographers site I am doing, and I > >>>> am limiting the size of the images somewhat to reduce pilferage and I > >>>> would like to be able to show the images a little larger, hence with a bit > >>>> more clarity and detail. > >>>> > >>>> Thanks for your input. > >>>> > >>>> Gary > >>> > >>> More info. > >>> > >>> I was asked off board where the watermark would show, so I am sorry if I was > >>> less than clear. The watermark would show on an image that is being > >>> downloaded from the server. If this were to work, I could let viewers see > >>> an image with a size of 640px in width to show clarity, (they are only able > >>> to see an image now with a width of 250 px now) should they decide to help > >>> themselves to it, it would download with a watermark on it, but the > >>> watermark would not appear on the web page itself. > >>> > >>> Gary > >>> > >>> > >>> > >>> __________ Information from ESET Smart Security, version of virus signature database 5458 (20100917) __________ > >>> > >>> The message was checked by ESET Smart Security. > >>> > >>> http://www.eset.com > >>> > >>> > >>> > >>> > >>> > >>> -- > >>> PHP General Mailing List (http://www.php.net/) > >>> To unsubscribe, visit: http://www.php.net/unsub.php > >>> > >> > >> > > > > > > There's no way to do this. Anything you see in your browser has already > > been downloaded in some form onto your computer, and once that happens > > it's out of your control. PHP has no way to detect if the image is being > > requested by the browser to view or download, so can't do what you want. > > > > Besides which, if an image is displayed in the browser, there are dozens > > of ways to get at it, from right clicking and saving it, using the media > > tab of the file info dialogue (firefox), using firebug to view it, > > saving it from the cache, saving the whole page, using wget to spider > > and save that page, etc. > > > > The only way to do what you want is to have your own custom browser app > > (possibly written in Java) but even then someone could simply do a print > > screen. > > > > At the end of the day, if you want to prevent people downloading your > > images, then just don't show them the image. > > Actually you can. Serve up an image from the DB and add watermark or whatever on the fly for web browsers. If a user downloads (assuming that s/he bought the image or the image is a "freebie" ) the image comes from the DB directly to the user using download headers. > > Tom > But the downloading will still be happening through the web browser, which PHP won't be able to recognise. Thanks, Ash http://www.ashleysheridan.co.uk