{"id":54759,"date":"2022-01-30T03:01:12","date_gmt":"2022-01-29T17:01:12","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=54759"},"modified":"2022-01-30T07:34:25","modified_gmt":"2022-01-29T21:34:25","slug":"the-cell-game-image-map-editing-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/the-cell-game-image-map-editing-tutorial\/","title":{"rendered":"The Cell Game Image Map Editing Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/the_cell.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"The Cell Game Image Map Editing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/the_cell_img_edit.jpg\" title=\"The Cell Game Image Map Editing Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">The Cell Game Image Map Editing Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a target=_blank title='CSS3 Filters Image Editing Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/css3-filters-image-editing-tutorial'>CSS3 Filters Image Editing Tutorial<\/a>&#8216;s saw us introduce an &#8220;in place image editing&#8221; external Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/img_svg.js_GETME\">img_svg.js<\/a> tool.<\/p>\n<p>Today sees us get a &#8220;second cab off the rank&#8221; going using that tool with the web application of <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/the-cell-game-primer-tutorial\/' title='The Cell Game Primer Tutorial'>The Cell Game Primer Tutorial<\/a>, and its interest lies in its modus operandi, principally an &#8220;image map&#8221;, which is basically an HTML img whose onclick logic is often &#8220;taken over&#8221; by a &#8220;map&#8221; full of &#8220;area&#8221; subelements partitioning off an area of the image associated with that area&#8217;s &#8220;href&#8221; attributed destination or &#8220;onclick&#8221; action.   We discovered a useful thing here, <font color=blue>when we changed an image map definition end part as per<\/font> &#8230;<\/p>\n<p><code><br \/>\n&lt;<font color=blue>!--<\/font>area shape=\"default\" nohref alt=\"\" \/<font color=blue>--<\/font>&gt;<br \/>\n&lt;\/map&gt;<br \/>\n<\/code><\/p>\n<p>Yes, make this change and the &#8220;non catered for&#8221; area parts are <i>allowed through to the keeper<\/i>, that being the underlying HTML img element, which we can write &#8220;onclick&#8221; logic for to involve our image editing tool ideas.<\/p>\n<p>Feel free to try <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/the_cell.html-GETME\" title=\"the_cell.html\">the mildly changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/the_cell.html-GETME\" title=\"the_cell.html\">the_cell.html<\/a>\u2018s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/the_cell.html\" title=\"css_filters.html\">The Cell Game<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/css3-filters-image-editing-tutorial\/'>New CSS3 Filters Image Editing Tutorial<\/a> ...<\/p>\n\n\n\n\n\n<hr>\n\n\n\n\n\n<p id='css3fiet'>Previous relevant <a target=_blank title='CSS3 Filters Image Editing Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/css3-filters-image-editing-tutorial\/'>CSS3 Filters Image Editing Tutorial<\/a> is shown below.<\/p>\n\n\n\n[caption id=\"\" align=\"alignnone\" width=\"220\" caption=\"CSS3 Filters Image Editing Tutorial\"]<a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_filters.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSS3 Filters Image Editing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/img_svg.jpg\" title=\"CSS3 Filters Image Editing Tutorial\"  style=\"float:left;\" \/><\/a>[\/caption]\n\n\n\n<p>The recent <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/gimp-guillotine-image-based-canvas-editing-tutorial\/' title='CSS3 Filters Primer Tutorial'>CSS3 Filters Primer Tutorial<\/a>'s <i>image based canvas editing RJM Programming external Javascript helper<\/i> themes got us thinking that this same destination \"User of Signature Signature\" helper could be tweaked to ...\n\n\n\n<ul>\n\n\n<li>still use HTML canvas as its editing conduit ... but, as of today ...<\/li>\n\n\n\n\n<li>accept from its \"window.opener\" parent HTML img element content, and amend that \"window.opener\" HTML img element in place<\/li>\n\n\n<\/ul>\n\n\n\n\n\n<p> ... in the form of a new \"first draft\" <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/img_svg.js_GETME\">img_svg.js<\/a> external Javascript suitable \"around the RJM Programming traps\" as a single line (within the <i>head<\/i> element) tool ...<\/p>\n\n\n\n<code>\n\/\/ img_svg.js\n\/\/ RJM Programming\n\/\/ January, 2022\n\/\/ Change an img via user_of_signature_signature.htm canvas\n<br \/>\n var eijimges=document.getElementsByTagName('img'); \n var eijimg;\n var eijdurl='';\n var eijpre='';\n var eijprechash='', eijchash='';\n var eijuoss=null;\n var eijpasseddu='', eijorigpasseddu='';\n var eijtextcss=location.search.split('textcss=')[1] ? decodeURIComponent(location.search.split('textcss=')[1].split('&')[0]) : '';\n var eijimagecss=location.search.split('imagecss=')[1] ? decodeURIComponent(location.search.split('imagecss=')[1].split('&')[0]) : '';\n var eijcss=location.search.split('css=')[1] ? decodeURIComponent(location.search.split('css=')[1].split('&')[0]) : '';\n var xcanvas;\n var xctx;\n var xbase_image;\n<br \/> \n function preeifsetup() {\n   eijimges=document.getElementsByTagName('img'); \n   if (eval('' + eijimges.length) &gt; 0) {\n     imageToUri(eijimges[0].src);\n     \/\/alert(eijimges[0].src);\n   } \/\/else {\n     \/\/alert('oops');\n   \/\/}\n }\n<br \/> \n function eijsetup() {\n eijimges=document.getElementsByTagName('img'); \n if (eval('' + eijimges.length) &gt; 0) {\n eijimg = document.querySelector('img');\n<br \/> \n if (!document.getElementById('gstyle')) {\n   var odivio=document.createElement('div');\n   odivio.id='gstyle';\n   odivio.innerHTML='';\n   document.getElementsByTagName('body')[0].appendChild(odivio);\n }\n<br \/>\n  if (eijcss != '') {\n  var eijgstyleis='';\n  if (eijcss == eijtextcss) {\n    eijgstyleis=' &lt;style&gt; &lt;\/style&gt; ';\n    eijgstyleis=eijgstyleis.replace('&lt;\/style', ' img, canvas { ' + eijtextcss + ' } &lt;\/style');\n    if (eijimagecss != '') { eijgstyleis=eijgstyleis.replace(' } &lt;\/style', ' ' + eijimagecss + ' } &lt;\/style');   }\n  } else if (eijcss == eijimagecss) {\n    eijgstyleis=' &lt;style&gt; &lt;\/style&gt; ';\n    eijgstyleis=eijgstyleis.replace('&lt;\/style', ' img, canvas { ' + eijimagecss + ' } &lt;\/style');\n    if (eijtextcss != '') { eijgstyleis=eijgstyleis.replace(' } &lt;\/style', ' ' + eijtextcss + ' } &lt;\/style');   }\n  } else {\n    eijgstyleis=' &lt;style&gt; &lt;\/style&gt; ';\n    eijgstyleis=eijgstyleis.replace('&lt;\/style', ' img, canvas { ' + eijcss + ' } &lt;\/style');\n    if (eijtextcss != '') { eijgstyleis=eijgstyleis.replace(' } &lt;\/style', ' ' + eijtextcss + ' } &lt;\/style');   }\n    if (eijimagecss != '') { eijgstyleis=eijgstyleis.replace(' } &lt;\/style', ' ' + eijimagecss + ' } &lt;\/style');   }\n  }\n  if (eijgstyleis != '') { document.getElementById('gstyle').innerHTML=eijgstyleis;   }\n  }\n<br \/>\n if (document.getElementById('gstyle')) {\n   if (document.getElementById('gstyle').innerHTML.indexOf('canvas {') != -1) {\n     eijprechash=document.getElementById('gstyle').innerHTML.split('canvas {')[1].split('}')[0];\n   }\n }\n if (eijimges[0].outerHTML.indexOf(' style=\"') != -1) {\n   eijchash=eijpre + '#' + encodeURIComponent(eijprechash + eijimges[0].outerHTML.split(' style=\"')[1].split('\"')[0]);\n }\n if (('' + eijimges[0].title) != 'Click me for canvas annotation editing (discrete click shapes and freeform scribbling) functionality in new window.') {\n  console.log('eijimges[0].outerHTML');\n  eijimges[0].title='Click me for canvas annotation editing (discrete click shapes and freeform scribbling) functionality in new window.';\n  if (eijimges[0].outerHTML.indexOf(' onclick=') == -1) {\n  console.log('onclick');\n  eijimges[0].onclick=function() { if (eijuoss) { if (eijuoss.closed) { eijuoss=null; }   }   if (!eijuoss) { setTimeout(eijmonitoru,6000); if (eijorigpasseddu == '' && 1 == 6) { imageToUri(eijimges[0].src); }  eijpasseddu=eijorigpasseddu; eijuoss=window.open('\/HTMLCSS\/user_of_signature_signature.htm?rand=' + Math.floor(Math.random() * 198765432) + '&elemode=img' + eijchash,'_blank','top=20,left=20,width=' + eval(0.9 * eval('' + screen.width)) + ',height=' + eval(0.8 * eval('' + screen.height)) + ''); } else { eijuoss.focus();  }  };\n  } else if (eijimges[0].outerHTML.indexOf('down=') == -1) {\n  console.log('onmousedown');\n  eijimges[0].onmousedown=function() {  if (eijuoss) { if (eijuoss.closed) { eijuoss=null; }   } if (!eijuoss) { setTimeout(eijmonitoru,6000); if (eijorigpasseddu == '' && 1 == 6) { imageToUri(eijimges[0].src); }  eijpasseddu=eijorigpasseddu; eijuoss=window.open('\/HTMLCSS\/user_of_signature_signature.htm?rand=' + Math.floor(Math.random() * 198765432) + '&elemode=img' + eijchash,'_blank','top=20,left=20,width=' + eval(0.9 * eval('' + screen.width)) + ',height=' + eval(0.8 * eval('' + screen.height)) + ''); } else { eijuoss.focus();  }  };\n  eijimges[0].ontouchdown=function() {  if (eijuoss) { if (eijuoss.closed) { eijuoss=null; }   } if (!eijuoss) { setTimeout(eijmonitoru,6000); if (eijorigpasseddu == '' && 1 == 6) { imageToUri(eijimges[0].src); }  eijpasseddu=eijorigpasseddu; eijuoss=window.open('\/HTMLCSS\/user_of_signature_signature.htm?rand=' + Math.floor(Math.random() * 198765432) + '&elemode=img' + eijchash,'_blank','top=20,left=20,width=' + eval(0.9 * eval('' + screen.width)) + ',height=' + eval(0.8 * eval('' + screen.height)) + ''); } else { eijuoss.focus();  }  };\n  }\n }\n }\n }\n<br \/> \n function imageToUri(url) { \/\/ thanks to https:\/\/stackoverflow.com\/questions\/25690641\/img-url-to-dataurl-using-javascript\n    xcanvas = document.createElement('canvas');\n    xctx = xcanvas.getContext('2d');\n    xbase_image = new Image();\n    xbase_image.onload = function() {\n        xcanvas.width = xbase_image.width;\n        xcanvas.height = xbase_image.height;\n<br \/>        \n        eijpre='&cancontw=' + xcanvas.width + '&canconth=' + xcanvas.height;\n<br \/>\n        xctx.drawImage(xbase_image, 0, 0);\n<br \/>    \n        eijorigpasseddu=xcanvas.toDataURL('image\/png');\n        eijpasseddu=eijorigpasseddu;\n        eijimges[0].src=eijorigpasseddu;\n        \/\/alert(eijorigpasseddu);\n        \/\/xcanvas.remove();\n    };\n    xbase_image.src = url;\n<br \/>    \n }\n<br \/>\n function eijmonitoru() {\n   if (eijuoss) { if (eijuoss.closed) { eijuoss=null; }   }  \n   if (eijuoss) {\n     if (eijuoss.document.getElementById('topcbutton')) {\n     if (eijuoss.document.getElementById('topcbutton').innerHTML.indexOf(' ') != -1) {\n       eijuoss.document.getElementById('topcbutton').innerHTML=eijuoss.document.getElementById('topcbutton').innerHTML.replace(' ','');\n       window.focus();\n     }\n     }\n    var eijthispdu=eijuoss.document.getElementById('topcanvas').toDataURL('image\/png');\n    if (eijpasseddu != eijthispdu) {\n      if (document.getElementById('antiu')) {\n      document.getElementById('antiu').style.display='inline-block';\n      }\n      eijpasseddu=eijthispdu;\n  \/\/var eijxnewimg=document.createElement('img');\n  \/\/eijxnewimg.onload = function() {\n    \/\/ draw the image onto the canvas\n    \/\/eijimg.getContext('2d').drawImage(eijxnewimg, 0, 0);\n    \/\/ draw the image onto the image\n    \/\/eijimg.src=eijxnewimg.src;\n  \/\/}\n  \/\/eijxnewimg.src = eijpasseddu;\n<br \/>  \n    eijimges[0].src=eijthispdu;\n<br \/>  \n    }\n     setTimeout(eijmonitoru, 6000);\n   }\n }\n<br \/> \n function eijuossc() {\n   if (eijuoss) { if (eijuoss.closed) { eijuoss=null; }   }  \n   if (!eijuoss) { \n     setTimeout(eijmonitoru,6000); \n     eijorigpasseddu=eijimges[0].src; \/\/toDataURL('image\/png'); \n     eijpasseddu=eijorigpasseddu;\n     \/\/eijuoss=window.open('\/\/www.rjmprogramming.com.au\/HTMLCSS\/user_of_signature_signature.htm' + eijchash,'_blank','top=20,left=20,width=' + eval(0.9 * eval('' + screen.width)) + ',height=' + eval(0.8 * eval('' + screen.height)) + ''); \n     eijuoss=window.open('\/HTMLCSS\/user_of_signature_signature.htm' + eijchash,'_blank','top=20,left=20,width=' + eval(0.9 * eval('' + screen.width)) + ',height=' + eval(0.8 * eval('' + screen.height)) + ''); \n   } else {\n     eijuoss.focus();\n   } \n }\n<br \/> \n function eijantiuossc() {\n  if (eijuoss) { if (eijuoss.closed) { eijuoss=null; }   }  \n  if (eijuoss) { \n  \/\/var eijznewimg=document.createElement('img');\n  \/\/eijznewimg.onload = function() {\n    \/\/ draw the image onto the canvas\n    \/\/eijimg.getContext('2d').drawImage(eijznewimg, 0, 0);\n    \/\/eijpasseddu=eijuoss.document.getElementById('topcanvas').toDataURL('image\/png');\n  \/\/}\n  \/\/eijznewimg.src = eijorigpasseddu;\n<br \/>  \n  eijimg.src=eijorigpasseddu;\n<br \/>  \n  } \n }\n<br \/>\n setTimeout(preeifsetup, 3000);\n setTimeout(eijsetup, 8000);\n<\/code>\n\n\n\n<p>So now for the \"first cab off the rank\" idea for a parent.   Well, <a title='CSS3 Filters Primer Tutorial' href='#css3fpt'>CSS3 Filters Primer Tutorial<\/a>'s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_filters.html-GETME\" title=\"css_filters.html\">mildly changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_filters.html-GETME\" title=\"css_filters.html\">css_filters.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_filters.html\" title=\"css_filters.html\">web application<\/a> sprang to mind.<\/p>\n\n\n\n\n\n<p>As previously mentioned, we also needed to tweak <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/user_of_signature_signature.html---------------GETME\" title=\"user_of_signature_signature.html\">our HTML changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/user_of_signature_signature.html---------------GETME\" title=\"user_of_signature_signature.html\">user_of_signature_signature.html<\/a>'s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/user_of_signature_signature.html\" title=\"Click picture\">User of Signature Signature (standalone) live run<\/a> to help realize our \"mini dream <font size=1>with a future<\/font>\"!<\/p>\n\n\n\n<!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/css3-filters-image-editing-tutorial\/'>CSS3 Filters Image Editing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='css3fpt'>Previous relevant <a target=_blank title='CSS3 Filters Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/css3-filters-primer-tutorial\/'>CSS3 Filters Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_filters.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSS3 Filters Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_filters.jpg\" title=\"CSS3 Filters Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">CSS3 Filters Primer Tutorial<\/p><\/div>\n<p>It&#8217;s not just the image editor <a target=_blank title='Gimp image editor' href='http:\/\/www.gimp.org\/'>Gimp<\/a> that has &#8220;filters&#8221; as tools to create effects with image data (files), as you might see with tutorials like <a title='Gimp Decor Filters Revisit Tutorial' href='#gdfrt'>Gimp Decor Filters Revisit Tutorial<\/a>.  These days, with CSS, and with <a target=_blank title='CSS3 information from w3schools' href='http:\/\/www.w3schools.com\/css\/css3_intro.asp'>CSS3<\/a> these days, there are some great &#8220;filters&#8221; to play around with, that modify an image there and then with CSS and\/or Javascript DOM (as per the HTML select &#8220;dropdown&#8221; element <i>onchange<\/i> event logic &#8230;<\/p>\n<p><code><br \/>\nfunction selchange(selo) {<br \/>\n  var bs=\"\";<br \/>\n  if (selo == null) {<br \/>\n  if (document.getElementById(\"sh-shadow\").value != \"\" && document.getElementById(\"sv-shadow\").value != \"\") {<br \/>\n  if (document.getElementById(\"xblur\").value != \"\") bs+=document.getElementById(\"xblur\").value + document.getElementById(\"xblur\").title + \" \";<br \/>\n  if (document.getElementById(\"sspread\").value != \"\") bs+=document.getElementById(\"sspread\").value + document.getElementById(\"sspread\").title + \" \";<br \/>\n  \/\/alert(\"drop-shadow(\" + document.getElementById(\"sh-shadow\").value + document.getElementById(\"sh-shadow\").title + \" \" + document.getElementById(\"sv-shadow\").value + document.getElementById(\"sv-shadow\").title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\");<br \/>\n  document.getElementById(\"myimage\").style.filter = \"drop-shadow(\" + document.getElementById(\"sh-shadow\").value + document.getElementById(\"sh-shadow\").title + \" \" + document.getElementById(\"sv-shadow\").value + document.getElementById(\"sv-shadow\").title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\";<br \/>\n  document.getElementById(\"myimage\").style.WebkitFilter = \"drop-shadow(\" + document.getElementById(\"sh-shadow\").value + document.getElementById(\"sh-shadow\").title + \" \" + document.getElementById(\"sv-shadow\").value + document.getElementById(\"sv-shadow\").title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\";<br \/>\n  }<br \/>\n  } else if (selo.id.substring(1) == 'h-shadow') {<br \/>\n  if (document.getElementById(\"sv-shadow\").value != \"\") {<br \/>\n  if (document.getElementById(\"xblur\").value != \"\") bs+=document.getElementById(\"xblur\").value + document.getElementById(\"xblur\").title + \" \";<br \/>\n  if (document.getElementById(\"sspread\").value != \"\") bs+=document.getElementById(\"sspread\").value + document.getElementById(\"sspread\").title + \" \";<br \/>\n  document.getElementById(\"myimage\").style.filter = \"drop-shadow(\" + selo.value + selo.title + \" \" + document.getElementById(\"sv-shadow\").value + document.getElementById(\"sv-shadow\").title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\";<br \/>\n  document.getElementById(\"myimage\").style.WebkitFilter = \"drop-shadow(\" + selo.value + selo.title + \" \" + document.getElementById(\"sv-shadow\").value + document.getElementById(\"sv-shadow\").title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\";<br \/>\n  }<br \/>\n  } else if (selo.id.substring(1) == 'v-shadow') {<br \/>\n  if (document.getElementById(\"sh-shadow\").value != \"\") {<br \/>\n  if (document.getElementById(\"xblur\").value != \"\") bs+=document.getElementById(\"xblur\").value + document.getElementById(\"xblur\").title + \" \";<br \/>\n  if (document.getElementById(\"sspread\").value != \"\") bs+=document.getElementById(\"sspread\").value + document.getElementById(\"sspread\").title + \" \";<br \/>\n  \/\/alert(\"drop-shadow(\" + document.getElementById(\"sh-shadow\").value + document.getElementById(\"sh-shadow\").title + \" \" + selo.value + selo.title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\");<br \/>\n  document.getElementById(\"myimage\").style.filter = \"drop-shadow(\" + document.getElementById(\"sh-shadow\").value + document.getElementById(\"sh-shadow\").title + \" \" + selo.value + selo.title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\";<br \/>\n  document.getElementById(\"myimage\").style.WebkitFilter = \"drop-shadow(\" + document.getElementById(\"sh-shadow\").value + document.getElementById(\"sh-shadow\").title + \" \" + selo.value + selo.title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\";<br \/>\n  }<br \/>\n  } else if (selo.id == 'xblur') {<br \/>\n  if (document.getElementById(\"sh-shadow\").value != \"\" && document.getElementById(\"sv-shadow\").value != \"\") {<br \/>\n  if (document.getElementById(\"xblur\").value != \"\") bs+=document.getElementById(\"xblur\").value + document.getElementById(\"xblur\").title + \" \";<br \/>\n  if (document.getElementById(\"sspread\").value != \"\") bs+=document.getElementById(\"sspread\").value + document.getElementById(\"sspread\").title + \" \";<br \/>\n  document.getElementById(\"myimage\").style.filter = \"drop-shadow(\" + document.getElementById(\"sh-shadow\").value + document.getElementById(\"sh-shadow\").title + \" \" + document.getElementById(\"sv-shadow\").value + document.getElementById(\"sv-shadow\").title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\";<br \/>\n  document.getElementById(\"myimage\").style.WebkitFilter = \"drop-shadow(\" + document.getElementById(\"sh-shadow\").value + document.getElementById(\"sh-shadow\").title + \" \" + document.getElementById(\"sv-shadow\").value + document.getElementById(\"sv-shadow\").title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\";<br \/>\n  }<br \/>\n  } else if (selo.id.substring(1) == 'spread') {<br \/>\n  if (document.getElementById(\"sh-shadow\").value != \"\" && document.getElementById(\"sv-shadow\").value != \"\") {<br \/>\n  if (document.getElementById(\"xblur\").value != \"\") bs+=document.getElementById(\"xblur\").value + document.getElementById(\"xblur\").title + \" \";<br \/>\n  if (document.getElementById(\"sspread\").value != \"\") bs+=document.getElementById(\"sspread\").value + document.getElementById(\"sspread\").title + \" \";<br \/>\n  document.getElementById(\"myimage\").style.filter = \"drop-shadow(\" + document.getElementById(\"sh-shadow\").value + document.getElementById(\"sh-shadow\").title + \" \" + document.getElementById(\"sv-shadow\").value + document.getElementById(\"sv-shadow\").title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\";<br \/>\n  document.getElementById(\"myimage\").style.WebkitFilter = \"drop-shadow(\" + document.getElementById(\"sh-shadow\").value + document.getElementById(\"sh-shadow\").title + \" \" + document.getElementById(\"sv-shadow\").value + document.getElementById(\"sv-shadow\").title + \" \" + bs + document.getElementById(\"mycolour\").value + \")\";<br \/>\n  }<br \/>\n  } else {<br \/>\n  document.getElementById(\"myimage\").style.filter = selo.id.substring(1) + \"(\" + selo.value + selo.title + \")\";<br \/>\n  document.getElementById(\"myimage\").style.WebkitFilter = selo.id.substring(1) + \"(\" + selo.value + selo.title + \")\";<br \/>\n  }<br \/>\n}<br \/>\n<\/code><\/p>\n<p>) &#8230; or jQuery means by which to make this happen with a lot of the modern web browsers.  If you see &#8220;CSS3&#8221; mentioned, then don&#8217;t expect everything to work on super-old web browsers, but expect that anything you implement could be aesthetically interesting or pleasing, as it would not have taken until CSS3 to come along if it was a dead set simple thing to have implemented in the early days of the internet.<\/p>\n<p>Today&#8217;s simple (really) proof of concept web application owes a debt of gratitude to this <a target=_blank title='https:\/\/www.w3schools.com\/cssref\/css3_pr_filter.asp' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_filter.asp'>very useful link<\/a>, which gave us the parameters by which we could construct today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_filters.html\" title='Click picture'>live run<\/a> with its pretty simple HTML and CSS (via CSS3) and Javascript DOM <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_filters.html_GETME\" title=\"css_filters.html\">css_filters.html<\/a> source code for you to peruse, and make of what you will.  So what (CSS3) filters are we talking about here?<\/p>\n<ul>\n<li>blur(px)<\/li>\n<li>brightness(%)<\/li>\n<li>contrast(%)<\/li>\n<li>drop-shadow(h-shadow v-shadow blur spread color)<\/li>\n<li>grayscale(%)<\/li>\n<li>hue-rotate(deg)<\/li>\n<li>invert(%)<\/li>\n<li>opacity(%)<\/li>\n<li>saturate(%)<\/li>\n<li>sepia(%)<\/li>\n<\/ul>\n<p> &#8230; which are mostly self explanatory we hope.  Let&#8217;s just say you&#8217;re me &#8230; &#8220;You&#8217;re me.&#8221; &#8230; ta &#8230; please explain &#8220;drop shadow&#8221; &#8230; oh &#8230; you mean &#8230; me?<\/p>\n<blockquote cite=\"https:\/\/en.wikipedia.org\/wiki\/Drop_shadow\"><p>\nIn graphic design, a drop shadow is a visual effect consisting of a drawing element which looks like the shadow of an object, giving the impression that the object is raised above the objects behind it.\n<\/p><\/blockquote>\n<p> &#8230; thanks, <a target=_blank title='Drop shadow information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Drop_shadow'>Wikipedia<\/a>.<\/p>\n<p>As you can imagine, this opening up of this functionality to the client-side web developer opens up lots of opportunities to make your webpages stand out.<\/p>\n<hr>\n<p id='gdfrt'>Previous relevant <a target=_blank title='Gimp Decor Filters Revisit Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/gimp-decor-filters-revisit-tutorial\/'>Gimp Decor Filters Revisit Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/GIMP\/gimp_decor.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Gimp Decor Filters Revisit Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/GIMP\/gimp_decor.jpg\" title=\"Gimp Decor Filters Revisit Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Gimp Decor Filters Revisit Tutorial<\/p><\/div>\n<p>Today we return to the wonderful, marvellous and stupendous <a target=_blank title='Gimp image editor' href='http:\/\/www.gimp.org\/'>Gimp<\/a> image editor and examine some more of its filters, following up on concepts last discussed with <a target=_blank title='Gimp Decor Border Filters Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/gimp-decor-border-filters-primer-tutorial\/'>Gimp Decor Border Filters Primer Tutorial<\/a> in the &#8220;Decor&#8221; category, namely &#8230;<\/p>\n<ul>\n<li>Fuzzy Border<\/li>\n<li>Coffee Stain<\/li>\n<li>Old Photo &#8230; in the tutorial picture &#8230; plus below &#8230;<\/li>\n<li>Add Bevel<\/li>\n<li>Add Border<\/li>\n<li>Slide<\/li>\n<li>Rounded Corners<\/li>\n<\/ul>\n<p> &#8230; which create quite good effects we feel, especially the Fuzzy Border filter, as it is quite difficult, otherwise to create a &#8220;smudged&#8221; border effect, perhaps for vignetting purposes, without this filter.  We imagine an old map photo could be glamourized using &#8220;Coffee Stain&#8221; (for the accident prone) or &#8220;Old Photo&#8221;.<\/p>\n<p>These &#8220;Decor&#8221; filters are available off Gimp&#8217;s Filter menu as a submenu containing these and some other effects.  They use <a target=_blank title='Gimp Script-Fu' href='https:\/\/docs.gimp.org\/en\/gimp-concepts-script-fu.html'>&#8220;Script-Fu&#8221;<\/a> based on the Scheme interpretive language.  These &#8220;Script-Fu&#8221; filters are not only powerful and useful for what they are, but also for how you can introduce predictability with your effects, in that you can record settings you use, make them public, as necessary, to help create a unified creative but predictable set of effects in the photographs you are applying filters to.<\/p>\n<p>So we&#8217;ll leave you with a photo of our house &#8230;<\/p>\n<p><img src='http:\/\/www.rjmprogramming.com.au\/GIMP\/house.jpg' title='Our house, in the middle of our street'><\/img><\/p>\n<p> &#8230; with &#8230;<\/p>\n<ul>\n<li>Fuzzy Border &#8230;<br \/>\n<img src='http:\/\/www.rjmprogramming.com.au\/GIMP\/house_fb.jpg' title='Our house, in Fuzzy Border'><\/img>\n<\/li>\n<li>Coffee Stain (&#8220;Darken only&#8221; unchecked) &#8230; probably not so apt for this image&#8217;s subject matter &#8230;<br \/>\n<img src='http:\/\/www.rjmprogramming.com.au\/GIMP\/house_cs.jpg' title='Our house, in Coffee Stain'><\/img>\n<\/li>\n<li>Old Photo (&#8220;Defocus&#8221;, &#8220;Sepia&#8221;, &#8220;Mottle&#8221; all checked) &#8230;<br \/>\n<img src='http:\/\/www.rjmprogramming.com.au\/GIMP\/house_op.jpg' title='Our house, in Old Photo'><\/img>\n<\/li>\n<li>Add Bevel (30, &#8220;Keep bump layer&#8221; checked) &#8230;<br \/>\n<img src='http:\/\/www.rjmprogramming.com.au\/GIMP\/house_abev.jpg' title='Our house, in Add Bevel'><\/img>\n<\/li>\n<li>Add Border (37 x and 37 y width, 85 delta value on default blue colour) &#8230;<br \/>\n<img src='http:\/\/www.rjmprogramming.com.au\/GIMP\/house_abdr.jpg' title='Our house, in Add Border'><\/img>\n<\/li>\n<li>Slide (62) &#8230;<br \/>\n<img src='http:\/\/www.rjmprogramming.com.au\/GIMP\/house_slide.jpg' title='Our house, in Slide'><\/img>\n<\/li>\n<li>Rounded Corners (Edge radius 30, Shadow x offset 15, y 15, Blur radius 25) &#8230;<br \/>\n<img src='http:\/\/www.rjmprogramming.com.au\/GIMP\/house_rc.jpg' title='Our house, in Rounded Corners'><\/img>\n<\/li>\n<\/ul>\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='#d21761' onclick='var dv=document.getElementById(\"d21761\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/gimp\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d21761' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d31927' onclick='var dv=document.getElementById(\"d31927\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/filter\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d31927' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d54754' onclick='var dv=document.getElementById(\"d54754\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/external-Javascript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54754' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d54759' onclick='var dv=document.getElementById(\"d54759\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/Javascript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54759' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday&#8217;s CSS3 Filters Image Editing Tutorial&#8216;s saw us introduce an &#8220;in place image editing&#8221; external Javascript img_svg.js tool. Today sees us get a &#8220;second cab off the rank&#8221; going using that tool with the web application of The Cell Game &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/the-cell-game-image-map-editing-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,14,37],"tags":[184,1580,282,354,409,431,2212,590,592,599,652,745,997,2005,1319],"class_list":["post-54759","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-canvas","tag-cell","tag-css3","tag-dom","tag-external-javascript","tag-filter","tag-head","tag-image","tag-image-map","tag-img","tag-javascript","tag-map","tag-programming","tag-tool","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54759"}],"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=54759"}],"version-history":[{"count":9,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54759\/revisions"}],"predecessor-version":[{"id":54768,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54759\/revisions\/54768"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=54759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=54759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=54759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}