FatherStorm Posted April 6, 2004 Posted April 6, 2004 what I built into mine.. think it should be incorporated... [file popup_image.php -existing with edits] <?php /* $Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright ? 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $navigation->remove_current_page(); $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $products = tep_db_fetch_array($products_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo $products['products_name']; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <script language="javascript"><!-- var i=0; function resize() { if (navigator.appName == 'Netscape') i=40; if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i); self.focus(); } //--></script> </head> <body onload="resize();"> <script>alert('This image is Copyright 2003 FatherStorm.')</script> <?php echo "<img src='wathermark.php?o=Copyright 2003 FatherStorm&i=images/".$products['products_image']."'>"; /*tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); */ ?> </body> </html> <?php require('includes/application_bottom.php'); ?> [file watermark.php] <?php $ifile=$_REQUEST['i']; if (!($ifile)) die('no image'); $own=$_REQUEST['o']; if (!($own)) $own="FS Grafix"; $iinfo=getimagesize($ifile,$iinfo); $sx= $iinfo[0]; $sy= $iinfo[1]; $nimage = imagecreate($sx,$sy+10); $white=imagecolorallocate($nimage,255,255,255); $black=imagecolorallocate($nimage,0,0,0); imagefill($nimage,0,0,$white); switch ($iinfo[2]) { case 1: $simage =imagecreatefromgif($ifile); break; case 2: $simage =imagecreatefromjpeg($ifile); break; case 3: $simage =imagecreatefrompng($ifile); break; case 6: $simage =imagecreatefromwbmp($ifile); break; default: die("Imagetype Not Supported"); } $text1=$own." ".date("m/d/y h:s"); $text2="Your IP# ".$_SERVER["REMOTE_ADDR"]."/".$_SERVER["HTTP_X_FORWARDED_FOR"]; imagecopy($nimage,$simage,0,0,0,0,$sx,$sy); imagefilledrectangle($nimage,1,$sy-13,250,$sy+10,$black); imagefilledrectangle($nimage,2,$sy-12,249,$sy+8,$white); imagestring($nimage,2,3,$sy-13,$text1,$black); imagestring($nimage,2,3,$sy-3,$text2,$black); imagejpeg($nimage); ?>
Guest Posted April 9, 2004 Posted April 9, 2004 what exactly does this do? I would like to make it to where the whole page is watermarked, is this how?? thanks chris
FatherStorm Posted April 10, 2004 Author Posted April 10, 2004 THis just places a watermark in the bottom left corner showing the time, the accessing IP and the copyright info. an example can be seen by clickin goon the thumbnail Here althought it wou;dn't be too hard to watermark a large area, it becomes dificult to do so without dirupting the original image, though using a transparent GIF should work as well, but scaling will still be an issue.
241 Posted April 10, 2004 Posted April 10, 2004 this does not seem to me to be a proper watermark in its true sense, as the mark is not semi transparent and embeded within the image, yes it does place the details in the corner of the image, however this in no way stops the image from being copied and the information taken off the corner in less than a minute as I have just done in order to prove to myself that this is a very low level deterent. The watermark would require to be embedded as part of the image throughout the image to be effective. Do you have a means to track the image thus the use of the ip address. No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
defender39 Posted April 27, 2004 Posted April 27, 2004 I dont get any image at all while trying to use this. I have tried 3 times with other contribs to create a watermark and always unsuccessfully. This would seem the easiest but again...I get no results. I created watermark.php in the root...and then I replaced my popup_image.php from the code above as well. Do I need to do anything else? Do i need to have the watermark image somewhere? Maybe my server is configed poorly. How do I test the php functions? I have the dynamic thumbnail installed and it works 100%. I dont see why that would interfere with this though.
Guest Posted May 5, 2004 Posted May 5, 2004 Jesse, you don't get any images because there is a typo in popup_image.php as presented below. Change "wathermark.php" to "watermark.php" -jared
Northwind Posted May 29, 2004 Posted May 29, 2004 241 - What then would you suggest? I have images that myself and the client are hesitant about posting...Becuase of this. I know nothing on the net is fool-proof in regards to image-stealing, but what technique would you consider best?
Guest Posted May 30, 2004 Posted May 30, 2004 Craig - - at least one thing to do is pop up warnings on R-Click, though some people don't like it. You can see how I've done mine to see if you'd benefit from that or not. -jared
Guest Posted May 31, 2004 Posted May 31, 2004 additionally, once you post your copyright notice, you could encrypt your copyright data into the image itself (at least the ones you display on the website) using something like steghide (steghide.sourceforge.net). Your copyright notice should then note that you have encrypted copyright data into your images, and should you find them on anyone else's site, you will prosecute <insert blah blah blah here> etc. You could even use all these ideas simultaneously. -jared
biggest_apple Posted December 4, 2004 Posted December 4, 2004 THis just places a watermark in the bottom left corner showing the time, the accessing IP and the copyright info. an example can be seen by clickin goon the thumbnail Here althought it wou;dn't be too hard to watermark a large area, it becomes dificult to do so without dirupting the original image, though using a transparent GIF should work as well, but scaling will still be an issue. <{POST_SNAPBACK}> I don't use an enlarge feature on my images - just the one size. I've installed some script to prevent hotlinking but I'd also like to watermark the images as well. The only thing is that I only want the watermark to appear if someone attempts to copy or save the image. What you're describing here sounds like this might be the solution I'm looking for but I would want the watermark to appear straight across the middle of the image thereby ruining the image for any potential thieves. Can this be done and if so - how?? Thanks :thumbsup:
kahml Posted December 6, 2004 Posted December 6, 2004 241 - What then would you suggest? I have images that myself and the client are hesitant about posting...Becuase of this. I know nothing on the net is fool-proof in regards to image-stealing, but what technique would you consider best? <{POST_SNAPBACK}> You might want to review the offerings at Digimarc. They have a comprehensive (albeit expensive) set of tools to place a digital indicator in your image. They have tracking software to let you know if someone has "nabbed" your image and is using it somewhere else. You can read more about their offerings here: http://www.digimarc.com/default.asp?digimark=0 Larry
Jack_mcs Posted December 6, 2004 Posted December 6, 2004 Craig - there is absolutely nothing you can do to prevent someone from grabbing your images. All you can do is make it more difficult for the image to be used. If someone wants the image and wants to take the time to remove the safeguards you put in it, they will get it. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
biggest_apple Posted December 6, 2004 Posted December 6, 2004 Craig - there is absolutely nothing you can do to prevent someone from grabbing your images. All you can do is make it more difficult for the image to be used. If someone wants the image and wants to take the time to remove the safeguards you put in it, they will get it. Jack <{POST_SNAPBACK}> I understand what you're saying but will what's being described here do what I'm looking for?? (see above)
Jack_mcs Posted December 6, 2004 Posted December 6, 2004 Only for internet users that don't know how to get around them. Of course, that is probably a majority and that's why I said to make it difficult. I would guess that most internet users know how to right click to grab an image. So if you make the image a lower resoution it might cut out some of them. You can also place a transparent image over the image so that when they right click they will get the transparent one. Or split the image into half's (quarters) so that they will only get parts of the image and have to re-assemble it. There are many more tricks you can use. Most people trying to just grab an image will probably stop at this point. But if they want it... Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Northwind Posted December 12, 2004 Posted December 12, 2004 Hi Jack, Uh - we get the point. I am very well aware of what you are talking about. I am one of those you mention. I can get any image from any source on the web. Most of us here can - it's part of the learning process when we are messing around with design/development - how did they do that type of thing. Lock your doors and windows, and there are people that can still get in your house and take your things. So what do you do? Just give up? I am just trying to ask about suggestions - the more preferred methods ...Not all of them - though I have heard of new and interesting ideas.
Jack_mcs Posted December 12, 2004 Posted December 12, 2004 Sorry if you took my answer as ranting. I was asked a question and replied. I've seen a number of people spend a lot of time trying to protect their images when it is usually all for naught. I wouldn't say you should give up. But you have to be realistic about the situation. Protect the images as I, and others, have suggested but keep in mind that they are not safe. There are several sites that sell images and are quite successful at it. But anyone can go to those sites and take the images if they want. The sites survive because many people don't know how to take them and many are just honest enough not to do it. The few that do will always be there as you point out with your example of the house. You just have to accept that. Put more time into making your site successful. Then, although some images will be stolen, the sales you make will make it easier to live with. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
ChrisW123 Posted December 28, 2004 Posted December 28, 2004 I've heard bad things about the DigiMark service. The problem is, this process adds a pattern of pixels to the image that can be identified by DigiMark service when it looks for the images on the web. However, if you make the "mark" too strong it will distort the image and won't look good. And if you make the "mark" too weak then it can be easily removed by a simple (and light) USM or Blur filter in Photoshop. The filter will basically make the "mark" unreadable. The best way is using the Watermark contribution in combination with a good watermark image that is transparent so that it doesn't ruin your images when a customer views them, but at the same time would be difficult to remove using PS without ruining the image. It's impossible to for anyone to download your image without also getting the watermark. Or so they say. The process uses .htaccess so I'm assuming it's reliable and impossible to get around?
Guest Posted January 1, 2005 Posted January 1, 2005 this does not seem to me to be a proper watermark in its true sense, as the mark is not semi transparent and embeded within the image, yes it does place the details in the corner of the image, however this in no way stops the image from being copied and the information taken off the corner in less than a minute as I have just done in order to prove to myself that this is a very low level deterent. The watermark would require to be embedded as part of the image throughout the image to be effective. Do you have a means to track the image thus the use of the ip address. <{POST_SNAPBACK}> Hi all, 241, I guess I don't understand your definition of a watermark here. A watermark (as I undertand it) has nothing to do with stopping the image from being downloaded, it just places a copyright or logo or something to 'brand' the image. I think this technique does just that. It processes the un-watermarked image and creates a new image with a watermark 'layer' on top of it. How did you take the watermark info off? Erasing it in an image editing app? I find this topic of interest because I am about to start a shop for a photographer, and would like to have his images watermarked automatically like this so I don't have to do it 1000 times! :)
MaryKH Posted February 27, 2005 Posted February 27, 2005 I figured out a way to have the images in the popup windows as a table cell background with a transparent image over them so if somebody right clicks, they are only saving the transparent image. This still won't prevent a persistent person from getting your images, especially if they are very skilled/knowledgeable, but the average viewer might not be able to figure it out. This is in the catalog/includes/functions/html_output.php file Original code // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) { if ($image_size = @getimagesize($src)) { if (empty($width) && tep_not_null($height)) { $ratio = $height / $image_size[1]; $width = $image_size[0] * $ratio; } elseif (tep_not_null($width) && empty($height)) { $ratio = $width / $image_size[0]; $height = $image_size[1] * $ratio; } elseif (empty($width) && empty($height)) { $width = $image_size[0]; $height = $image_size[1]; } } elseif (IMAGE_REQUIRED == 'false') { return false; } } if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image .= '>'; return $image; } Now I wasn't sure if this function was used anywhere other than the popup images, so instead of editing that portion, I inserted a second portion immediately under that //// // The HTML image wrapper function function tep2_image($src, $alt = '', $width = '', $height = '', $parameters = '') { if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default $image = '<table width="480" border="0" height="640"><tr><td background="' . tep_output_string($src) . '"><img src="/spacer.gif" width="480" height="640"></td></tr></table>'; if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) { if ($image_size = @getimagesize($src)) { if (empty($width) && tep_not_null($height)) { $ratio = $height / $image_size[1]; $width = $image_size[0] * $ratio; } elseif (tep_not_null($width) && empty($height)) { $ratio = $width / $image_size[0]; $height = $image_size[1] * $ratio; } elseif (empty($width) && empty($height)) { $width = $image_size[0]; $height = $image_size[1]; } } elseif (IMAGE_REQUIRED == 'false') { return false; } } return $image; } //// All of my images are the same size 480 x 640, you might have to change that up some if your images are different For the transparent image over the background, I pointed this to a transparent gif in my root directory called spacer.gif
Guest Posted March 2, 2005 Posted March 2, 2005 Why not put a copyright notice in the bottom left hand corner of your images, not dynamically, but by editing the images themselves? Of course if you have a large number of images this becomes unfeasible to do manually, but if you download a little freeware* application called Irfanview you can run a batch on all of your currently used images, if you have say 200 images it'll take you all of 60 seconds to set up the batch to run and another 30 seconds to process all of the images. Of course there are loads of other applications available to do this, I just personally like this one in particular as it has a lot of other useful functions. *Irfanview is freeware for home use, the guy asks for a small donation if you are going to use it commercially, I think it's about $20 or so from memory.
dakatone Posted March 7, 2005 Posted March 7, 2005 Two effective watermarks are as follows: 1. The watermark is itself part of the image and there are no layers. WYSIWYG 2. The image that is calling the attention is actually set as the background, the "watermark" being a classic GIF file overlaying the background. When saved the only image seen is the copyright information. Not a 100% foolproof way, but effective nonetheless without having to physically watermark potentially thousands of images. Ruhl
Recommended Posts
Archived
This topic is now archived and is closed to further replies.