{"id":37423,"date":"2018-04-16T03:01:58","date_gmt":"2018-04-15T17:01:58","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=37423"},"modified":"2018-04-16T06:35:51","modified_gmt":"2018-04-15T20:35:51","slug":"watermarking-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/watermarking-primer-tutorial\/","title":{"rendered":"Watermarking Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/watermarking.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Watermarking Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/watermarking.jpg\" title=\"Watermarking Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Watermarking Primer Tutorial<\/p><\/div>\n<p><a target=_blank title='Digital watermarking information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Digital_watermarking'>Watermarking<\/a> is a process more and more content owners are becoming interested in.  For us, on thinking about this topic, we immediately thought about PHP&#8217;s <a target=_blank title='PHP GD Image library information' href='http:\/\/php.net\/manual\/en\/book.image.php'>GD<\/a> image library.  So we typed into the address bar <a target=_blank title='Google search for php gd watermark' href='https:\/\/www.google.com.au\/search?q=php+gd+watermark&#038;ie=utf-8&#038;oe=utf-8&#038;client=firefox-b-ab&#038;gfe_rd=cr&#038;dcr=0&#038;ei=CoHRWqSGKpDp8weE6q2gBw'>php gd watermark<\/a> which, in turn, got us onto an excellent start to our PHP coding from <a target=_blank title='Useful link' href='\/\/php.net\/manual\/en\/image.examples.merged-watermark.php'>this excellent link<\/a>, thanks.<\/p>\n<p>We wrote a supervisory PHP web application using an HTML form method=GET so that its dual purpose goes like &#8230;<\/p>\n<ul>\n<li>if there are no ? and\/or &amp; URL arguments existant, the web application shows an HTML form asking for &#8230;\n<ol>\n<li>image filename or URL<\/li>\n<li>watermark opacity from 0 to 100<\/li>\n<li>watermark wording of a top line<\/li>\n<li>watermark wording of a bottom line<\/li>\n<\/ol>\n<p> &#8230; that if the user clicks the submit button for &#8230;\n<\/li>\n<li>if there are ? and\/or &amp; URL arguments existant via the HTML form navigation, we &#8230;\n<ol>\n<li>perform the PHP GD library processing calls, resulting in &#8230;<\/li>\n<li>creation of a PNG image on the web server &#8230; used (and self destructed) via (PHP code) &#8230;<br \/>\n<code><br \/>\nheader('Content-Type: image\/png');<br \/>\necho file_get_contents($imwillbe);<br \/>\nunlink($imwillbe);<br \/>\nexit;<br \/>\n<\/code><br \/>\n &#8230; allowing for &#8230;\n<\/li>\n<li>web page that results will have a web browser right click (Windows) or two finger gesture (Mac OS X) option to Save Image As (or something similar) to save your work with the watermark included<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>Our first draft of <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/watermarking.php_GETME\" title=\"watermark.php\">watermark.php<\/a> can be tried, by you, at this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/watermarking.php\" title=\"Click picture\">live run<\/a> link.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d37423' onclick='var dv=document.getElementById(\"d37423\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/gd\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d37423' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Watermarking is a process more and more content owners are becoming interested in. For us, on thinking about this topic, we immediately thought about PHP&#8217;s GD image library. So we typed into the address bar php gd watermark which, in &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/watermarking-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[1550,590,876,932,2042,997,1319,1345,2529],"class_list":["post-37423","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-gd","tag-image","tag-opacity","tag-php","tag-png","tag-programming","tag-tutorial","tag-url","tag-watermark"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/37423"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=37423"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/37423\/revisions"}],"predecessor-version":[{"id":37460,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/37423\/revisions\/37460"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=37423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=37423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=37423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}