{"id":55525,"date":"2022-04-27T03:01:11","date_gmt":"2022-04-26T17:01:11","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=55525"},"modified":"2022-04-26T14:17:17","modified_gmt":"2022-04-26T04:17:17","slug":"video-to-amended-animated-gif-mobile-slide-swap-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/video-to-amended-animated-gif-mobile-slide-swap-tutorial\/","title":{"rendered":"Video to Amended Animated GIF Mobile Slide Swap Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Video to Amended Animated GIF Mobile Slide Swap Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif_mobile.jpg\" title=\"Video to Amended Animated GIF Mobile Slide Swap Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Video to Amended Animated GIF Mobile Slide Swap Tutorial<\/p><\/div>\n<p>The &#8220;drag&#8221; about yesterday&#8217;s <a title='Video to Amended Animated GIF Drag Slide Swap Tutorial' href='#vaagifdsst'>Video to Amended Animated GIF Drag Slide Swap Tutorial<\/a>&#8216;s slide swapping functionality was that mobile platforms were left out.  Sometimes there is no alternative modus operandi to offer a mobile user, but here, we did not need to &#8230;<\/p>\n<ul>\n<li>simulate drag and drop with double clicking kind of logic &#8230; but, rather, just &#8230;<\/li>\n<li>simulate drag and drop with single clicking kind of logic &#8230; and so, also not restrict the swapping to adjoining slides &#8230; via new &#8220;onclick&#8221; Javascript function logic &#8230;<br \/>\n&lt;?php echo &#8221;<br \/>\n<code><br \/>\nfunction mspanhover(elmnt) {<br \/>\n  if (spanso.length == 0) {<br \/>\n    if (dragto.length == 0) {<br \/>\n      dragto.push(elmnt.id.replace('ours',''));<br \/>\n    } else {<br \/>\n      dragto[0]=elmnt.id.replace('ours','');<br \/>\n    }<br \/>\n    if (document.getElementById(('slideshow' + dragto[0]).replace(\/slideshow1$\/g,'slideshow')).value != '') {<br \/>\n      spanso.push(elmnt);<br \/>\n    }<br \/>\n  } else if (spanso.length == 1) {<br \/>\n    if (elmnt.id != spanso[0].id) {<br \/>\n    if (dragfrom.length == 0) {<br \/>\n      dragfrom.push(elmnt.id.replace('ours',''));<br \/>\n    } else {<br \/>\n      dragfrom[0]=elmnt.id.replace('ours','');<br \/>\n    }<br \/>\n    if (document.getElementById(('slideshow' + dragfrom[0]).replace(\/slideshow1$\/g,'slideshow')).value != '') {<br \/>\n        var yesdoit=confirm('Swap Image ' + dragto[0] + ' for Image ' + dragfrom[0] + ' content?');<br \/>\n        if (yesdoit) {<br \/>\n          var fromx=document.getElementById(('slideshow' + dragto[0]).replace(\/slideshow1$\/g,'slideshow')).value;<br \/>\n          var tox=document.getElementById(('slideshow' + dragfrom[0]).replace(\/slideshow1$\/g,'slideshow')).value;<br \/>\n          document.getElementById(('slideshow' + dragto[0]).replace(\/slideshow1$\/g,'slideshow')).value=tox;<br \/>\n          document.getElementById(('slideshow' + dragfrom[0]).replace(\/slideshow1$\/g,'slideshow')).value=fromx;<br \/>\n          var inthis=document.getElementById(('slideshow' + dragto[0]).replace(\/slideshow1$\/g,'slideshow'));<br \/>\n          inthis.style.color='black';<br \/>\n          inthis.style.opacity='1.0';<br \/>\n          inthis.style.background='';<br \/>\n          inthis.style.border='';<br \/>\n          inthis.style.outset='';<br \/>\n          inthis=document.getElementById(('slideshow' + dragfrom[0]).replace(\/slideshow1$\/g,'slideshow'));<br \/>\n          inthis.style.color='black';<br \/>\n          inthis.style.opacity='1.0';<br \/>\n          inthis.style.background='';<br \/>\n          inthis.style.border='';<br \/>\n          inthis.style.outset='';<br \/>\n        }<br \/>\n        spanso=[];<br \/>\n        dragfrom=[];<br \/>\n        dragto=[];<br \/>\n    }<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;\n<\/li>\n<\/ul>\n<p>Which, of course, begs the question, why not apply &#8220;single clicking kind of logic&#8221; for non-mobile platforms?<\/p>\n<blockquote><p>\nIrresistible arguments.  Well presented.  Joy to have in the class.\n<\/p><\/blockquote>\n<p>And so, is there any role going forward for the drag logic?<\/p>\n<blockquote><p>\nInteresting argument.  But there are users who love drag and drop.\n<\/p><\/blockquote>\n<p>And so, for those non-mobile users we allow the two approaches to co-exist.  One thing we do for mobile platforms, alone, though, is to set the &#8220;text-decoration&#8221; (CSS) styling of those &#8220;Tutorial Slideshow&#8221; elements be set to &#8220;underline&#8221; to make up for the lack of a span title attribute the user would see on a non-mobile platform as they hover over that span element for <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php----------------------------------------------------------GETME'>the changed<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php----------------------------------------------------------GETME'>tutorial_to_animated_gif.php<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php'>our inhouse Animated GIF Creator helper PHP web application<\/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\/video-to-amended-animated-gif-mobile-slide-swap-tutorial\/'>Video to Amended Animated GIF Drag Slide Swap Tutorial<\/a>.<\/p-->\n<hr>\n<p id='vaagifdsst'>Previous relevant <a target=_blank title='Video to Amended Animated GIF Drag Slide Swap Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/video-to-amended-animated-gif-drag-slide-swap-tutorial\/'>Video to Amended Animated GIF Drag Slide Swap Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Video to Amended Animated GIF Drag Slide Swap Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif_drag_swap.jpg\" title=\"Video to Amended Animated GIF Drag Slide Swap Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Video to Amended Animated GIF Drag Slide Swap Tutorial<\/p><\/div>\n<p>Today&#8217;s work improving on yesterday&#8217;s <a title='Video to Amended Animated GIF Alignment Tutorial' href='#vaagifat'>Video to Amended Animated GIF Alignment Tutorial<\/a>, has, yet again, alas, only a non-mobile platform applicability, that being &#8230;<\/p>\n<blockquote><p>\nDrag and Drop\n<\/p><\/blockquote>\n<p> &#8230; methodologies to allow for Animated GIF slide swaps with an adjoining slide (slot) <a href='#vtaagspt'>because<\/a> &#8230;<\/p>\n<blockquote cite='https:\/\/www.rjmprogramming.com.au\/ITblog\/video-to-amended-animated-gif-slide-preview-tutorial'><p>\nThe reason we think those non-mobile users will enjoy this functionality, if anything like me, is that we might browse for images in a sorted bunch and assume all is well, but that order may not suit in the animated GIF order structure, and here is a mechanism that might help.\n<\/p><\/blockquote>\n<p>We got great help from <a target=_blank href='https:\/\/www.w3schools.com\/howto\/howto_js_draggable.asp' title='How To Create a Draggable HTML Element' title='Thanks to W3Schools'>How To Create a Draggable HTML Element<\/a> (by <a target=_blank href='https:\/\/www.w3schools.com\/' title='W3Schools'>W3Schools<\/a>), thanks, piecing together the (PHP writes) Javascript benefitting from yesterday&#8217;s work lining up the &#8220;Tutorial Slideshow&#8221; span ( now including <i>onmouseover=spanhover(this); onmouseout=spanunhover(this);<\/i> ) elements over to the left of the webpage, with &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n var dragfrom=[];<br \/>\n var dragto=[];<br \/>\n<br \/>\nfunction spanhover(elmnt) {<br \/>\n  var srectz=null, srecty=null, srectx=null, sifilter=null;<br \/>\n  if (1 == 1) {<br \/>\n  if (document.getElementById('y' + elmnt.id)) {<br \/>\n    srecty=document.getElementById('y' + elmnt.id).getBoundingClientRect();<br \/>\n  }<br \/>\n  if (document.getElementById('z' + elmnt.id)) {<br \/>\n    srectz=document.getElementById('z' + elmnt.id).getBoundingClientRect();<br \/>\n    srectx=document.getElementById('x' + elmnt.id).getBoundingClientRect();<br \/>\n    sifilter=document.getElementById('x' + elmnt.id).getBoundingClientRect();<br \/>\n    document.getElementById('z' + elmnt.id).style.position='absolute';<br \/>\n    \/\/document.getElementById('z' + elmnt.id).style.left='' + srectz.left + 'px';<br \/>\n    document.getElementById('x' + elmnt.id).style.position='absolute';<br \/>\n    \/\/document.getElementById('x' + elmnt.id).style.left='' + srectx.left + 'px';<br \/>\n    document.getElementById('ifilter').style.position='absolute';<br \/>\n    \/\/document.getElementById('ifilter').style.left='' + sifilter.left + 'px';<br \/>\n  }<br \/>\n  if (document.getElementById('y' + elmnt.id)) {<br \/>\n    document.getElementById('y' + elmnt.id).style.position='absolute';<br \/>\n    \/\/document.getElementById('y' + elmnt.id).style.left='' + srecty.left + 'px';<br \/>\n    document.getElementById('y' + elmnt.id).style.color='blue';<br \/>\n  }<br \/>\n  }<br \/>\n  elmnt.style.opacity='0.5';<br \/>\n  elmnt.title='You can swap (or drag) this image content one down or up';<br \/>\n  elmnt.style.position='absolute';<br \/>\n  dragElement(elmnt);<br \/>\n}<br \/>\n<br \/>\nfunction spanunhover(elmnt) {<br \/>\n  if (1 == 1) {<br \/>\n  if (document.getElementById('z' + elmnt.id)) {<br \/>\n    document.getElementById('z' + elmnt.id).style.position='relative';<br \/>\n    document.getElementById('x' + elmnt.id).style.position='relative';<br \/>\n    document.getElementById('ifilter').style.position='relative';<br \/>\n  }<br \/>\n  if (document.getElementById('y' + elmnt.id)) {<br \/>\n    document.getElementById('y' + elmnt.id).style.position='relative';<br \/>\n    document.getElementById('y' + elmnt.id).style.color='black';<br \/>\n  }<br \/>\n  }<br \/>\n  elmnt.style.opacity='1.0';<br \/>\n  elmnt.style.position='relative';<br \/>\n  elmnt.title='';<br \/>\n  elmnt.onmousedown=function(evt){ evt=evt; };<br \/>\n  elmnt.onmouseup=function(evt){ evt=evt; };<br \/>\n  elmnt.onmousemove=function(evt){ evt=evt; };<br \/>\n}<br \/>\n<br \/>\nfunction dragElement(elmnt) {  \/\/ thanks to https:\/\/www.w3schools.com\/howto\/howto_js_draggable.asp<br \/>\n  var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;<br \/>\n  if (document.getElementById(elmnt.id + 'header')) {<br \/>\n    \/\/ if present, the header is where you move the DIV from:<br \/>\n    document.getElementById(elmnt.id + 'eader').onmousedown = dragMouseDown;<br \/>\n  } else {<br \/>\n    \/\/ otherwise, move the DIV from anywhere inside the DIV:<br \/>\n    elmnt.onmousedown = dragMouseDown;<br \/>\n    if (dragfrom.length == 1) {<br \/>\n      closeDragElement();<br \/>\n      \/\/if (('dragfrom[0]=' + dragfrom[0] + ' and dragto[0]=' + dragto[0]).length &lt;= 40) {<br \/>\n      \/\/alert('dragfrom[0]=' + dragfrom[0] + ' and dragto[0]=' + dragto[0]);<br \/>\n      \/\/ \/\/dragfrom[0]=eval('' + elmnt.target.id.replace('ours',''));<br \/>\n      \/\/}<br \/>\n    }<br \/>\n  }<br \/>\n<br \/>\n  function dragMouseDown(e) {<br \/>\n    e = e || window.event;<br \/>\n    e.preventDefault();<br \/>\n    \/\/ get the mouse cursor position at startup:<br \/>\n    pos3 = e.clientX;<br \/>\n    pos4 = e.clientY;<br \/>\n    document.onmouseup = closeDragElement;<br \/>\n    \/\/ call a function whenever the cursor moves:<br \/>\n    document.onmousemove = elementDrag;<br \/>\n  }<br \/>\n<br \/>\n  function elementDrag(e) {<br \/>\n    e = e || window.event;<br \/>\n    e.preventDefault();<br \/>\n    \/\/ calculate the new cursor position:<br \/>\n    if (e.clientX) {<br \/>\n    pos1 = pos3 - e.clientX;<br \/>\n    pos2 = pos4 - e.clientY;<br \/>\n    pos3 = e.clientX;<br \/>\n    pos4 = e.clientY;<br \/>\n    } else if (e.pageX) {<br \/>\n    pos1 = pos3 - e.pageX;<br \/>\n    pos2 = pos4 - e.pageY;<br \/>\n    pos3 = e.pageX;<br \/>\n    }<br \/>\n    \/\/ set the element new position:<br \/>\n    if (eval('' + pos2) &gt; 0) {<br \/>\n    if (dragfrom.length == 0) {<br \/>\n      dragfrom.push(eval('' + e.target.id.replace('ours','')));<br \/>\n      dragto.push(eval(1 + eval('' + e.target.id.replace('ours',''))));<br \/>\n    } else {<br \/>\n      dragfrom[0]=eval('' + e.target.id.replace('ours',''));<br \/>\n      dragto[0]=eval(1 + eval('' + e.target.id.replace('ours','')));<br \/>\n    }<br \/>\n    \/\/alert('heading south');<br \/>\n    } else if (eval('' + pos2) &lt; 0) {<br \/>\n    \/\/alert('heading north');<br \/>\n    if (dragfrom.length == 0) {<br \/>\n      dragfrom.push(eval('' + e.target.id.replace('ours','')));<br \/>\n      dragto.push(eval(-1 + eval('' + e.target.id.replace('ours',''))));<br \/>\n    } else {<br \/>\n      dragfrom[0]=eval('' + e.target.id.replace('ours',''));<br \/>\n      dragto[0]=eval(-1 + eval('' + e.target.id.replace('ours','')));<br \/>\n    }<br \/>\n    } else if (1 == 3) {<br \/>\n    elmnt.style.top = (elmnt.offsetTop - pos2) + 'px';<br \/>\n    elmnt.style.left = (elmnt.offsetLeft - pos1) + 'px';<br \/>\n    }<br \/>\n  }<br \/>\n<br \/>\n  function closeDragElement() {<br \/>\n    \/\/ stop moving when mouse button is released:<br \/>\n    if (dragfrom.length != 0) {<br \/>\n      if (document.getElementById('ours' + dragto[0])) {<br \/>\n       if (document.getElementById(('slideshow' + dragto[0]).replace(\/slideshow1$\/g,'slideshow')).value != '' && document.getElementById(('slideshow' + dragfrom[0]).replace(\/slideshow1$\/g,'slideshow')).value != '') {<br \/>\n        var yesdoit=confirm('Swap Image ' + dragto[0] + ' for Image ' + dragfrom[0] + ' content?');<br \/>\n        if (yesdoit) {<br \/>\n          var fromx=document.getElementById(('slideshow' + dragto[0]).replace(\/slideshow1$\/g,'slideshow')).value;<br \/>\n          var tox=document.getElementById(('slideshow' + dragfrom[0]).replace(\/slideshow1$\/g,'slideshow')).value;<br \/>\n          document.getElementById(('slideshow' + dragto[0]).replace(\/slideshow1$\/g,'slideshow')).value=tox;<br \/>\n          document.getElementById(('slideshow' + dragfrom[0]).replace(\/slideshow1$\/g,'slideshow')).value=fromx;<br \/>\n          var inthis=document.getElementById(('slideshow' + dragto[0]).replace(\/slideshow1$\/g,'slideshow'));<br \/>\n          inthis.style.color='black';<br \/>\n          inthis.style.opacity='1.0';<br \/>\n          inthis.style.background='';<br \/>\n          inthis.style.border='';<br \/>\n          inthis.style.outset='';<br \/>\n          inthis=document.getElementById(('slideshow' + dragfrom[0]).replace(\/slideshow1$\/g,'slideshow'));<br \/>\n          inthis.style.color='black';<br \/>\n          inthis.style.opacity='1.0';<br \/>\n          inthis.style.background='';<br \/>\n          inthis.style.border='';<br \/>\n          inthis.style.outset='';<br \/>\n        }<br \/>\n       }<br \/>\n      }<br \/>\n      dragfrom=[];<br \/>\n      dragto=[];<br \/>\n    }<br \/>\n    document.onmouseup = null;<br \/>\n    document.onmousemove = null;<br \/>\n    document.onmousedown = null;<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; to bring this about for <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php----------------------------------------------------------GETME'>the changed<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php----------------------------------------------------------GETME'>tutorial_to_animated_gif.php<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php'>our inhouse Animated GIF Creator helper PHP web application<\/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\/video-to-amended-animated-gif-alignment-tutorial\/'>Video to Amended Animated GIF Drag Slide Swap Tutorial<\/a>.<\/p-->\n<hr>\n<p id='vaagifat'>Previous relevant <a target=_blank title='Video to Amended Animated GIF Alignment Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/video-to-amended-animated-gif-alignment-tutorial\/'>Video to Amended Animated GIF Alignment Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Video to Amended Animated GIF Preview Forever Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif_float_align.jpg\" title=\"Video to Amended Animated GIF Preview Forever Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Video to Amended Animated GIF Alignment Tutorial<\/p><\/div>\n<p>Around here when &#8220;alignment&#8221; thoughts are teamed with &#8220;web design&#8221; we still like the &#8220;oldy worldy&#8221; HTML table element approach, but such an idea felt a bit too extra kludgy regarding the &#8220;dynamically vertically expanding&#8221; ideas in the Animated GIF Creator (PHP) web application of yesterday&#8217;s <a title='Video to Amended Animated GIF Preview Forever Tutorial' href='#vaagifpft'>Video to Amended Animated GIF Preview Forever Tutorial<\/a>.<\/p>\n<p>We could apply pretty complex CSS styling and use &#8220;div&#8221; elements, no doubt!  But we opted for some application of <font color=blue>new<\/font> textbox applicable CSS that uses &#8230;<\/p>\n<ol>\n<li>percentage widths ( width: 80%; )<\/li>\n<li><font color=blue><a target=_blank title='CSS float property information from W3schools' href='https:\/\/www.w3schools.com\/cssref\/pr_class_float.asp'>float<\/a>: right;<\/font><\/li>\n<li><font color=blue><a target=_blank title='CSS margin-right property information from W3schools' href='https:\/\/www.w3schools.com\/cssref\/pr_margin-right.asp'>margin-right<\/a>: 1%;<\/font><\/li>\n<\/ol>\n<p> &#8230; and then work at making other elements align around this &#8220;good start&#8221; having a neat right hand edge for the &#8220;delay(s)&#8221; and &#8220;slide(s)&#8221; textboxes.  An impediment to good &#8220;alignment&#8221; results also had us revisiting our penchant for any CSS &#8220;align: center&#8221; ideas, instead making &#8220;alignment&#8221; on the left hand side of the web application be &#8220;to the left&#8221; <font size=1>(doh!)<\/font><\/p>\n<p>Let&#8217;s take a look at <font color=blue>(PHP writes) Javascript alignment related changes to &#8220;previewing&#8221; logic<\/font> that augments the PHP variable <font color=purple>change<\/font> &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n$seventypc=\"<font color=purple>80%;float:right;margin-right:1%<\/font>\";<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; is &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n var lastiid='', relatedto=null;<br \/>\n var delaylastiid='', delayrelatedto=null, delayslidenum=-1, delaythisslide=-1, delaysare=[];<br \/>\n<br \/> <br \/>\nfunction prenext() {<br \/>\n    if (delayrelatedto) {<br \/>\n    if (delaythisslide &gt;= delayslidenum) {<br \/>\n      delaythisslide=1;<br \/>\n      document.getElementById('delay').style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + document.getElementById('slideshow').value + '\\\")';<br \/>\n      setTimeout(prenext, eval('' + delaysare[0]));<br \/>\n    } else {<br \/>\n      delaythisslide++;<br \/>\n      document.getElementById('delay').style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + document.getElementById('slideshow' + eval(0 + eval(delaythisslide))).value + '\\\")';<br \/>\n      if (delaythisslide &lt;= delaysare.length) {<br \/>\n       setTimeout(prenext, eval('' + delaysare[eval(-1 + eval('' + delaythisslide))]));<br \/>\n      } else {<br \/>\n       setTimeout(prenext, eval('' + delaysare[0]));<br \/>\n      }<br \/>\n    }<br \/>\n    }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction preanimate(inthis, inthisvalue) {<br \/>\n  var delaysuff='';<br \/>\n  delaysare=inthisvalue.split(',');<br \/>\n  if (delayslidenum == -1 || 1 == 1) {<br \/>\n    delayslidenum=-1;<br \/>\n    while (document.getElementById('slideshow' + delaysuff).value != '') {<br \/>\n     if (delayslidenum == -1) {<br \/>\n       delayslidenum=1;<br \/>\n       delaysuff='' + eval(1 + eval('' + delayslidenum));<br \/>\n     } else {<br \/>\n       delayslidenum++;<br \/>\n       delaysuff='' + eval(1 + eval('' + delayslidenum));<br \/>\n     }<br \/>\n    }<br \/>\n  }<br \/>\n  delaythisslide=1;<br \/>\n  setTimeout(prenext, eval('' + delaysare[0]));<br \/>\n  return document.getElementById('slideshow').value;<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction preafterbithis() {<br \/>\n  if (delayrelatedto) {<br \/>\n  if (delaylastiid == ('' + delayrelatedto.id)) {<br \/>\n    delaylastiid='';<br \/>\n    \/\/delayrelatedto=null;<br \/>\n  }<br \/>\n  } else {<br \/>\n    delaylastiid='';<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction preinrelatedto() {<br \/>\n  var thisappi=1;<br \/>\n  if (delayrelatedto) {<br \/>\n      if (('' + delayrelatedto.title).indexOf('ong hover') != -1) {<br \/>\n        var appiwords=('' + delayrelatedto.title).replace(' after losing focus', ' after losing focus 0').split(' ');<br \/>\n        delayrelatedto.title+=' ' + eval(1 + eval(appiwords[eval(-1 + appiwords.length)]));<br \/>\n        if (eval(1 + eval(appiwords[eval(-1 + appiwords.length)])) &lt;= 7) { delayrelatedto.style.border='' + eval(1 + eval(appiwords[eval(-1 + appiwords.length)])) + 'px dotted yellow';  delayrelatedto.style.borderLeftStyle='solid';  }<br \/>\n        setTimeout(preinrelatedto, 990);<br \/>\n      }<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction prebithis(inthis) {<br \/>\n  if (inthis.value.trim() != '') {<br \/>\n      if (delayrelatedto) {<br \/>\n        if (('' + inthis.id) != ('' + delayrelatedto.id)) {<br \/>\n          preunbithis(delayrelatedto);<br \/>\n          delayrelatedto=null;<br \/>\n        }<br \/>\n      }<br \/>\n      if (('' + inthis.getAttribute('data-oh')).replace(\/^undefined$\/g,'').replace(\/^null$\/g,'') == '') {<br \/>\n        inthis.setAttribute('data-oh', '' + inthis.getBoundingClientRect().height);<br \/>\n        <font color=blue>if (document.getElementById('ours0')) {   document.getElementById('ours0').setAttribute('data-oh', '' + document.getElementById('ours0').getBoundingClientRect().height); }<\/font><br \/>\n      }<br \/>\n      if (('' + inthis.title).indexOf('ong hover') == -1) {<br \/>\n         inthis.title+=' ... long hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      } else {<br \/>\n         inthis.title=inthis.title.split('ong hover')[0] + 'ong hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      }<br \/>\n      inthis.style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + preanimate(inthis, inthis.value) + '\\\")';<br \/>\n      inthis.style.height='80px';<br \/>\n      <font color=blue>if (document.getElementById('ours0')) {<br \/>\n        document.getElementById('ours0').style.height='80px';<br \/>\n        document.getElementById('ours0').style.display='inline-block';<br \/>\n      }<\/font><br \/>\n      inthis.style.backgroundSize='contain';<br \/>\n      inthis.style.backgroundRepeat='no-repeat';<br \/>\n      inthis.style.backgroundPosition='right top';<br \/>\n      delaylastiid='' + inthis.id;<br \/>\n      delayrelatedto=inthis;<br \/>\n      setTimeout(preinrelatedto, 990);<br \/>\n      setTimeout(preafterbithis, 7000);<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction preunbithis(inthis) {<br \/>\n  if (inthis.value.trim() != '' && delaylastiid == ('' + inthis.id)) {<br \/>\n    if (('' + inthis.title).indexOf('ong hover') != -1) {<br \/>\n      inthis.title=inthis.title.split('ong hover')[0] + 'ong hover keeps background animated GIF image in place after losing focus';<br \/>\n    }<br \/>\n    if (delayrelatedto) {<br \/>\n      delayrelatedto=null;<br \/>\n    }<br \/>\n    if (('' + inthis.getAttribute('data-oh')).replace(\/^undefined$\/g,'').replace(\/^null$\/g,'') != '') {<br \/>\n      inthis.style.height='' + inthis.getAttribute('data-oh') + 'px';<br \/>\n      <font color=blue>if (document.getElementById('ours0')) {   document.getElementById('ours0').style.height='' + document.getElementById('ours0').getAttribute('data-oh') + 'px'; document.getElementById('ours0').style.display='inline'; }<\/font><br \/>\n    }<br \/>\n    inthis.style.color='black';<br \/>\n    inthis.style.opacity='1.0';<br \/>\n    inthis.style.background='';<br \/>\n    inthis.style.border='';<br \/>\n    inthis.style.outset='';<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction afterbithis() {<br \/>\n  if (relatedto) {<br \/>\n  if (lastiid == ('' + relatedto.id)) {<br \/>\n    lastiid='';<br \/>\n    relatedto=null;<br \/>\n  }<br \/>\n  } else {<br \/>\n    lastiid='';<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction inrelatedto() {<br \/>\n  var thisappi=1;<br \/>\n  if (relatedto) {<br \/>\n      if (('' + relatedto.title).indexOf('ong hover') != -1) {<br \/>\n        var appiwords=('' + relatedto.title).replace(' after losing focus', ' after losing focus 0').split(' ');<br \/>\n        relatedto.title+=' ' + eval(1 + eval(appiwords[eval(-1 + appiwords.length)]));<br \/>\n        if (eval(1 + eval(appiwords[eval(-1 + appiwords.length)])) &lt;= 7) { relatedto.style.border='' + eval(1 + eval(appiwords[eval(-1 + appiwords.length)])) + 'px dotted yellow';  relatedto.style.borderLeftStyle='solid'; }<br \/>\n        setTimeout(inrelatedto, 990);<br \/>\n      }<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction bithis(inthis) {<br \/>\n  if (inthis.value.trim() != '') {<br \/>\n    if (relatedto) {<br \/>\n      if (('' + inthis.id) != ('' + relatedto.id)) {<br \/>\n        unbithis(relatedto);<br \/>\n        relatedto=null;<br \/>\n      }<br \/>\n    }<br \/>\n    if (('' + inthis.getAttribute('data-oh')).replace(\/^undefined$\/g,'').replace(\/^null$\/g,'') == '') {<br \/>\n      inthis.setAttribute('data-oh', '' + inthis.getBoundingClientRect().height);<br \/>\n      <font color=blue>if (('' + inthis.id) == 'slideshow') {<br \/>\n        if (document.getElementById('ours1')) {   document.getElementById('ours1').setAttribute('data-oh', '' + document.getElementById('ours1').getBoundingClientRect().height); }<br \/>\n      } else if (('' + inthis.id).indexOf('slideshow') == 0) {<br \/>\n        document.getElementById('ours' + ('' + inthis.id).replace('slideshow','')).setAttribute('data-oh', '' + document.getElementById('ours' + ('' + inthis.id).replace('slideshow','')).getBoundingClientRect().height);<br \/>\n      }<\/font><br \/>\n    }<br \/>\n    if (inthis.value.indexOf('data:') == 0) {<br \/>\n      if (('' + inthis.title).indexOf('ong hover') == -1) {<br \/>\n         inthis.title+=' ... long hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      } else {<br \/>\n         inthis.title=inthis.title.split('ong hover')[0] + 'ong hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      }<br \/>\n      inthis.style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + inthis.value + '\\\")';<br \/>\n      inthis.style.color='rgba(240,240,240,0.2)';<br \/>\n      inthis.style.height='80px';<br \/>\n      <font color=blue>if (('' + inthis.id) == 'slideshow') {<br \/>\n        if (document.getElementById('ours1')) {   document.getElementById('ours1').style.height='80px'; document.getElementById('ours1').style.display='inline-block'; }<br \/>\n      } else if (('' + inthis.id).indexOf('slideshow') == 0) {<br \/>\n        document.getElementById('ours' + ('' + inthis.id).replace('slideshow','')).style.height='80px';<br \/>\n        document.getElementById('ours' + ('' + inthis.id).replace('slideshow','')).style.display='inline-block';<br \/>\n      }<\/font><br \/>\n      inthis.style.backgroundSize='contain';<br \/>\n      inthis.style.backgroundRepeat='no-repeat';<br \/>\n      inthis.style.backgroundPosition='right top';<br \/>\n      lastiid='' + inthis.id;<br \/>\n      relatedto=inthis;<br \/>\n      setTimeout(inrelatedto, 1000);<br \/>\n    } else if (inthis.value.indexOf('.') != -1) {<br \/>\n      if (('' + inthis.title).indexOf('ong hover') == -1) {<br \/>\n         inthis.title+=' ... long hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      } else {<br \/>\n         inthis.title=inthis.title.split('ong hover')[0] + 'ong hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      }<br \/>\n      inthis.style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + inthis.value + '\\\")';<br \/>\n      inthis.style.height='80px';<br \/>\n      <font color=blue>if (('' + inthis.id) == 'slideshow') {<br \/>\n        if (document.getElementById('ours1')) {   document.getElementById('ours1').style.height='80px'; document.getElementById('ours1').style.display='inline-block'; }<br \/>\n      } else if (('' + inthis.id).indexOf('slideshow') == 0) {<br \/>\n        document.getElementById('ours' + ('' + inthis.id).replace('slideshow','')).style.height='80px';<br \/>\n        document.getElementById('ours' + ('' + inthis.id).replace('slideshow','')).style.display='inline-block';<br \/>\n      }<\/font><br \/>\n      inthis.style.backgroundSize='contain';<br \/>\n      inthis.style.backgroundRepeat='no-repeat';<br \/>\n      inthis.style.backgroundPosition='right top';<br \/>\n      lastiid='' + inthis.id;<br \/>\n      relatedto=inthis;<br \/>\n      setTimeout(inrelatedto, 990);<br \/>\n    }<br \/>\n    setTimeout(afterbithis, 7000);<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction unbithis(inthis) {<br \/>\n  if (inthis.value.trim() != '' && lastiid == ('' + inthis.id)) {<br \/>\n    if (('' + inthis.title).indexOf('ong hover') != -1) {<br \/>\n      inthis.title=inthis.title.split('ong hover')[0] + 'ong hover keeps background image in place after losing focus';<br \/>\n    }<br \/>\n    if (relatedto) {<br \/>\n      relatedto=null;<br \/>\n    }<br \/>\n    if (('' + inthis.getAttribute('data-oh')).replace(\/^undefined$\/g,'').replace(\/^null$\/g,'') != '') {<br \/>\n      inthis.style.height='' + inthis.getAttribute('data-oh') + 'px';<br \/>\n      <font color=blue>if (('' + inthis.id) == 'slideshow') {<br \/>\n        if (document.getElementById('ours1')) {   document.getElementById('ours1').style.height='' + document.getElementById('ours1').getAttribute('data-oh') + 'px'; document.getElementById('ours1').style.display='inline'; }<br \/>\n      } else if (('' + inthis.id).indexOf('slideshow') == 0) {<br \/>\n        document.getElementById('ours' + ('' + inthis.id).replace('slideshow','')).style.height='' + document.getElementById('ours' + ('' + inthis.id).replace('slideshow','')).getAttribute('data-oh') + 'px';<br \/>\n        document.getElementById('ours' + ('' + inthis.id).replace('slideshow','')).style.display='inline';<br \/>\n      }<\/font><br \/>\n    }<br \/>\n    inthis.style.color='black';<br \/>\n    inthis.style.opacity='1.0';<br \/>\n    inthis.style.background='';<br \/>\n    inthis.style.border='';<br \/>\n    inthis.style.outset='';<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; for <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php---------------------------------------------------------GETME'>the changed<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php---------------------------------------------------------GETME'>tutorial_to_animated_gif.php<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php'>our inhouse Animated GIF Creator helper PHP web application<\/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\/video-to-amended-animated-gif-alignment-tutorial\/'>Video to Amended Animated GIF Alignment Tutorial<\/a>.<\/p-->\n<hr>\n<p id='vaagifpft'>Previous relevant <a target=_blank title='Video to Amended Animated GIF Preview Forever Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/video-to-amended-animated-gif-preview-forever-tutorial\/'>Video to Amended Animated GIF Preview Forever Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Video to Amended Animated GIF Preview Forever Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif_delayag_preview.jpg\" title=\"Video to Amended Animated GIF Preview Forever Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Video to Amended Animated GIF Preview Forever Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='Video to Amended Animated GIF Slide Preview Forever Tutorial' href='#vaagifspft'>Video to Amended Animated GIF Slide Preview Forever Tutorial<\/a>, am sure there are a lot of readers out there who&#8217;d like &#8230;<\/p>\n<ul>\n<li>not only the possibility for a preview of individual slide images &#8230; but &#8230;<\/li>\n<li>a preview approximation of the final animated GIF (we decide to offer in non-mobile hover and long hover scenarios for the &#8220;delay&#8221; textbox)<\/li>\n<\/ul>\n<p> &#8230; positioned there because the delay is what makes an animated GIF be the &#8220;animation&#8221; it is.<\/p>\n<p>If you saw this coming, you&#8217;ll not be too surprised by the PHP self contained work that complements the &#8220;delay&#8221; textbox&#8217;s <i>onmouseover=prebithis(this); onmouseout=preunbithis(this);<\/i> new Javascript functionality &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n var delaylastiid='', delayrelatedto=null, delayslidenum=-1, delaythisslide=-1, delaysare=[];<br \/>\n<br \/>\nfunction prenext() {<br \/>\n    if (delayrelatedto) {<br \/>\n    if (delaythisslide &gt;= delayslidenum) {<br \/>\n      delaythisslide=1;<br \/>\n      document.getElementById('delay').style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + document.getElementById('slideshow').value + '\\\")';<br \/>\n      setTimeout(prenext, eval('' + delaysare[0]));<br \/>\n    } else {<br \/>\n      delaythisslide++;<br \/>\n      document.getElementById('delay').style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + document.getElementById('slideshow' + eval(0 + eval(delaythisslide))).value + '\\\")';<br \/>\n      if (delaythisslide &lt;= delaysare.length) {<br \/>\n       setTimeout(prenext, eval('' + delaysare[eval(-1 + eval('' + delaythisslide))]));<br \/>\n      } else {<br \/>\n       setTimeout(prenext, eval('' + delaysare[0]));<br \/>\n      }<br \/>\n    }<br \/>\n    }<br \/>\n}<br \/>\n<br \/>\nfunction preanimate(inthis, inthisvalue) {<br \/>\n  var delaysuff='';<br \/>\n  delaysare=inthisvalue.split(',');<br \/>\n  if (delayslidenum == -1 || 1 == 1) {<br \/>\n    delayslidenum=-1;<br \/>\n    while (document.getElementById('slideshow' + delaysuff).value != '') {<br \/>\n     if (delayslidenum == -1) {<br \/>\n       delayslidenum=1;<br \/>\n       delaysuff='' + eval(1 + eval('' + delayslidenum));<br \/>\n     } else {<br \/>\n       delayslidenum++;<br \/>\n       delaysuff='' + eval(1 + eval('' + delayslidenum));<br \/>\n     }<br \/>\n    }<br \/>\n  }<br \/>\n  delaythisslide=1;<br \/>\n  setTimeout(prenext, eval('' + delaysare[0]));<br \/>\n  return document.getElementById('slideshow').value;<br \/>\n}<br \/>\n<br \/>\nfunction preafterbithis() {<br \/>\n  if (delayrelatedto) {<br \/>\n  if (delaylastiid == ('' + delayrelatedto.id)) {<br \/>\n    delaylastiid='';<br \/>\n    \/\/delayrelatedto=null;<br \/>\n  }<br \/>\n  } else {<br \/>\n    delaylastiid='';<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nfunction preinrelatedto() {<br \/>\n  var thisappi=1;<br \/>\n  if (delayrelatedto) {<br \/>\n      if (('' + delayrelatedto.title).indexOf('ong hover') != -1) {<br \/>\n        var appiwords=('' + delayrelatedto.title).replace(' after losing focus', ' after losing focus 0').split(' ');<br \/>\n        delayrelatedto.title+=' ' + eval(1 + eval(appiwords[eval(-1 + appiwords.length)]));<br \/>\n        if (eval(1 + eval(appiwords[eval(-1 + appiwords.length)])) &lt;= 7) { delayrelatedto.style.border='' + eval(1 + eval(appiwords[eval(-1 + appiwords.length)])) + 'px dotted yellow'; }<br \/>\n        setTimeout(preinrelatedto, 1000);<br \/>\n      }<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction prebithis(inthis) {<br \/>\n  if (inthis.value.trim() != '') {<br \/>\n      if (delayrelatedto) {<br \/>\n        if (('' + inthis.id) != ('' + delayrelatedto.id)) {<br \/>\n          preunbithis(delayrelatedto);<br \/>\n          delayrelatedto=null;<br \/>\n        }<br \/>\n      }<br \/>\n      if (('' + inthis.getAttribute('data-oh')).replace(\/^undefined$\/g,'').replace(\/^null$\/g,'') == '') {<br \/>\n        inthis.setAttribute('data-oh', '' + inthis.getBoundingClientRect().height);<br \/>\n      }<br \/>\n      if (('' + inthis.title).indexOf('ong hover') == -1) {<br \/>\n         inthis.title+=' ... long hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      } else {<br \/>\n         inthis.title=inthis.title.split('ong hover')[0] + 'ong hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      }<br \/>\n      inthis.style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + preanimate(inthis, inthis.value) + '\\\")';<br \/>\n      inthis.style.height='80px';<br \/>\n      inthis.style.backgroundSize='contain';<br \/>\n      inthis.style.backgroundRepeat='no-repeat';<br \/>\n      inthis.style.backgroundPosition='right top';<br \/>\n      delaylastiid='' + inthis.id;<br \/>\n      delayrelatedto=inthis;<br \/>\n      setTimeout(preinrelatedto, 1000);<br \/>\n      setTimeout(preafterbithis, 7000);<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction preunbithis(inthis) {<br \/>\n  if (inthis.value.trim() != '' && delaylastiid == ('' + inthis.id)) {<br \/>\n    if (('' + inthis.title).indexOf('ong hover') != -1) {<br \/>\n      inthis.title=inthis.title.split('ong hover')[0] + 'ong hover keeps background animated GIF image in place after losing focus';<br \/>\n    }<br \/>\n    if (delayrelatedto) {<br \/>\n      delayrelatedto=null;<br \/>\n    }<br \/>\n    if (('' + inthis.getAttribute('data-oh')).replace(\/^undefined$\/g,'').replace(\/^null$\/g,'') != '') {<br \/>\n      inthis.style.height='' + inthis.getAttribute('data-oh') + 'px';<br \/>\n    }<br \/>\n    inthis.style.color='black';<br \/>\n    inthis.style.opacity='1.0';<br \/>\n    inthis.style.background='';<br \/>\n    inthis.style.border='';<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; for <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php--------------------------------------------------------GETME'>the changed<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php--------------------------------------------------------GETME'>tutorial_to_animated_gif.php<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php'>our inhouse Animated GIF Creator helper PHP web application<\/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\/new-video-to-amended-animated-gif-preview-forever-tutorial\/'>Video to Amended Animated GIF Preview Forever Tutorial<\/a>.<\/p-->\n<hr>\n<p id='vaagifspft'>Previous relevant <a target=_blank title='Video to Amended Animated GIF Slide Preview Forever Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/video-to-amended-animated-gif-slide-preview-forever-tutorial\/'>Video to Amended Animated GIF Slide Preview Forever Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Video to Amended Animated GIF Slide Preview Forever Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif_preview_forever.jpg\" title=\"Video to Amended Animated GIF Slide Preview Forever Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Video to Amended Animated GIF Slide Preview Forever Tutorial<\/p><\/div>\n<p>Further to yesterday&#8217;s <a title='Video to Amended Animated GIF Slide Preview Tutorial' href='#vaagifspt'>Video to Amended Animated GIF Slide Preview Tutorial<\/a> &#8230;<\/p>\n<blockquote><p>\n &#8230; and then, there&#8217;s the idea to leave the image thumbnail there\n<\/p><\/blockquote>\n<p> &#8230; concept.  Wouldn&#8217;t you say?  But, how to implement this?  Well, as for the recent <a target=_blank title='Landing Page Linked Background Images Long Hover Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-linked-background-images-long-hover-tutorial'>Landing Page Linked Background Images Long Hover Tutorial<\/a> we figured that the &#8220;Long Hover&#8221; ideas form that independent and non-interfering (with existent non-mobile functionality) methodology we could look into, so that the &#8220;just hover&#8221; <font color=blue>work became<\/font> &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n<font color=blue> var lastiid='', relatedto=null;<br \/>\n<br \/> <br \/>\nfunction afterbithis() {<br \/>\n  if (relatedto) {<br \/>\n  if (lastiid == ('' + relatedto.id)) {<br \/>\n    lastiid='';<br \/>\n    relatedto=null;<br \/>\n  }<br \/>\n  } else {<br \/>\n    lastiid='';<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nfunction inrelatedto() {<br \/>\n  var thisappi=1;<br \/>\n  if (relatedto) {<br \/>\n      if (('' + relatedto.title).indexOf('ong hover') != -1) {<br \/>\n        var appiwords=('' + relatedto.title).replace(' after losing focus', ' after losing focus 0').split(' ');<br \/>\n        relatedto.title+=' ' + eval(1 + eval(appiwords[eval(-1 + appiwords.length)]));<br \/>\n        if (eval(1 + eval(appiwords[eval(-1 + appiwords.length)])) &lt;= 7) { relatedto.style.border='' + eval(1 + eval(appiwords[eval(-1 + appiwords.length)])) + 'px dotted yellow'; }<br \/>\n        setTimeout(inrelatedto, 1000);<br \/>\n      }<br \/>\n  }<br \/>\n}<\/font><br \/>\n<br \/> <br \/>\nfunction bithis(inthis) {<br \/>\n  if (inthis.value.trim() != '') {<br \/>\n    <font color=blue>if (relatedto) {<br \/>\n      if (('' + inthis.id) != ('' + relatedto.id)) {<br \/>\n        unbithis(relatedto);<br \/>\n        relatedto=null;<br \/>\n      }<br \/>\n    }<\/font><br \/>\n    if (('' + inthis.getAttribute('data-oh')).replace(\/^undefined$\/g,'').replace(\/^null$\/g,'') == '') {<br \/>\n      inthis.setAttribute('data-oh', '' + inthis.getBoundingClientRect().height);<br \/>\n    }<br \/>\n    if (inthis.value.indexOf('data:') == 0) {<br \/>\n      <font color=blue>if (('' + inthis.title).indexOf('ong hover') == -1) {<br \/>\n         inthis.title+=' ... long hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      } else {<br \/>\n         inthis.title=inthis.title.split('ong hover')[0] + 'ong hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      }<\/font><br \/>\n      inthis.style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + inthis.value + '\\\")';<br \/>\n      inthis.style.color='rgba(240,240,240,0.2)';<br \/>\n      inthis.style.height='80px';<br \/>\n      inthis.style.backgroundSize='contain';<br \/>\n      inthis.style.backgroundRepeat='no-repeat';<br \/>\n      inthis.style.backgroundPosition='right top';<br \/>\n      <font color=blue>lastiid='' + inthis.id;<br \/>\n      relatedto=inthis;<br \/>\n      setTimeout(inrelatedto, 1000);<\/font><br \/>\n    } else if (inthis.value.indexOf('.') != -1) {<br \/>\n      <font color=blue>if (('' + inthis.title).indexOf('ong hover') == -1) {<br \/>\n         inthis.title+=' ... long hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      } else {<br \/>\n         inthis.title=inthis.title.split('ong hover')[0] + 'ong hover of 7 seconds keeps background image in place after losing focus';<br \/>\n      }<\/font><br \/>\n      inthis.style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + inthis.value + '\\\")';<br \/>\n      inthis.style.height='80px';<br \/>\n      inthis.style.backgroundSize='contain';<br \/>\n      inthis.style.backgroundRepeat='no-repeat';<br \/>\n      inthis.style.backgroundPosition='right top';<br \/>\n      <font color=blue>lastiid='' + inthis.id;<br \/>\n      relatedto=inthis;<br \/>\n      setTimeout(inrelatedto, 1000);<\/font><br \/>\n    }<br \/>\n    setTimeout(afterbithis, 7000);<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction unbithis(inthis) {<br \/>\n  if (inthis.value.trim() != ''<font color=blue> && lastiid == ('' + inthis.id)<\/font>) {<br \/>\n    <font color=blue>if (('' + inthis.title).indexOf('ong hover') != -1) {<br \/>\n      inthis.title=inthis.title.split('ong hover')[0] + 'ong hover keeps background image in place after losing focus';<br \/>\n    }<br \/>\n    if (relatedto) {<br \/>\n      relatedto=null;<br \/>\n    }<\/font><br \/>\n    if (('' + inthis.getAttribute('data-oh')).replace(\/^undefined$\/g,'').replace(\/^null$\/g,'') != '') {<br \/>\n      inthis.style.height='' + inthis.getAttribute('data-oh') + 'px';<br \/>\n    }<br \/>\n    inthis.style.color='black';<br \/>\n    inthis.style.opacity='1.0';<br \/>\n    inthis.style.background='';<br \/>\n    <font color=blue>inthis.style.border='';<\/font><br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; to, again, accompany the (input type=text) slide textbox <i>onmouseover=bithis(this); onmouseout=unbithis(this);<\/i> &#8220;short hover&#8221; event logic callers, to get a taste for what is involved here, in <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php-------------------------------------------------------GETME'>the changed<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php-------------------------------------------------------GETME'>tutorial_to_animated_gif.php<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php'>our inhouse Animated GIF Creator helper PHP web application<\/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\/video-to-amended-animated-gif-slide-preview-forever-tutorial\/'>Video to Amended Animated GIF Slide Preview Forever Tutorial<\/a>.<\/p-->\n<hr>\n<p id='vaagifspt'>Previous relevant <a target=_blank title='Video to Amended Animated GIF Slide Preview Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/video-to-amended-animated-gif-slide-preview-tutorial\/'>Video to Amended Animated GIF Slide Preview Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Video to Amended Animated GIF Slide Preview Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif_preview.jpg\" title=\"Video to Amended Animated GIF Slide Preview Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Video to Amended Animated GIF Slide Preview Tutorial<\/p><\/div>\n<p>Keeping to the recent theme of interest in (the non-mobile) &#8220;onmouseover&#8221; (hover) and &#8220;onmouseout&#8221; events, today we improve our inhouse Animated GIF Creator helper PHP web application last talked about with <a title='Video to Amended Animated GIF via ffmpeg Tutorial' href='#vaagift'>Video to Amended Animated GIF via ffmpeg Tutorial<\/a>.<\/p>\n<p>The reason we think those non-mobile users will enjoy this functionality, if anything like me, is that we might browse for images in a sorted bunch and assume all is well, but that order may not suit in the animated GIF order structure, and here is a mechanism that might help.<\/p>\n<p>And so take a look at <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php------------------------------------------------------GETME'>the changed<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php------------------------------------------------------GETME'>tutorial_to_animated_gif.php<\/a> <a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php'>our inhouse Animated GIF Creator helper PHP web application<\/a> &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\nfunction bithis(inthis) {<br \/>\n  if (inthis.value.trim() != '') {<br \/>\n    if (('' + inthis.getAttribute('data-oh')).replace(\/^undefined$\/g,'').replace(\/^null$\/g,'') == '') {<br \/>\n      inthis.setAttribute('data-oh', '' + inthis.getBoundingClientRect().height);<br \/>\n    }<br \/>\n    if (inthis.value.indexOf('data:') == 0) {<br \/>\n      inthis.style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + inthis.value + '\\\")';<br \/>\n      inthis.style.color='rgba(240,240,240,0.2)';<br \/>\n      inthis.style.height='80px';<br \/>\n      inthis.style.backgroundSize='contain';<br \/>\n      inthis.style.backgroundRepeat='no-repeat';<br \/>\n      inthis.style.backgroundPosition='right top';<br \/>\n    } else if (inthis.value.indexOf('.') != -1) {<br \/>\n      inthis.style.backgroundImage='linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\\\"' + inthis.value + '\\\")';<br \/>\n      inthis.style.height='80px';<br \/>\n      inthis.style.backgroundSize='contain';<br \/>\n      inthis.style.backgroundRepeat='no-repeat';<br \/>\n      inthis.style.backgroundPosition='right top';<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nfunction unbithis(inthis) {<br \/>\n  if (inthis.value.trim() != '') {<br \/>\n    if (('' + inthis.getAttribute('data-oh')).replace(\/^undefined$\/g,'').replace(\/^null$\/g,'') != '') {<br \/>\n      inthis.style.height='' + inthis.getAttribute('data-oh') + 'px';<br \/>\n    }<br \/>\n    inthis.style.color='black';<br \/>\n    inthis.style.opacity='1.0';<br \/>\n    inthis.style.background='';<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; to accompany the (input type=text) slide textbox <i>onmouseover=bithis(this); onmouseout=unbithis(this);<\/i> event logic callers, to get a taste for what is involved here.<\/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\/video-to-amended-animated-gif-slide-preview-tutorial\/'>New Video to Amended Animated GIF via ffmpeg Tutorial<\/a> ...<\/p>\n\n\n\n\n\n<hr>\n\n\n\n\n\n<p id='vaagift'>Previous relevant <a target=_blank title='Video to Amended Animated GIF via ffmpeg Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/video-to-amended-animated-gif-via-ffmpeg-tutorial\/'>Video to Amended Animated GIF via ffmpeg Tutorial<\/a> is shown below.<\/p>\n\n\n\n[caption id=\"\" align=\"alignnone\" width=\"220\" caption=\"Video to Amended Animated GIF via ffmpeg Tutorial\"]<a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/rolling.mov\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Video to Amended Animated GIF via ffmpeg Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/rolling.gif\" title=\"Video to Amended Animated GIF via ffmpeg Tutorial\"  style=\"float:left;\" \/><\/a>[\/caption]\n\n\n\n<p>So many of us are enthralled by our pet dog(s).  We have the joy of bringing up a Golden Retriever called <i>Nala<\/i> and her good friend <i>Luna<\/i>, the English Springer Spaniel.  Now Luna is normally the naturally talented dog, at many things, but she has taken an \"L\" plate quality interest, off Nala, with grass rolling.  She'll get there, and it's kind of cute watching her learn a skill that doesn't immediately fit into her instinctual skillset!<\/p>\n\n\n\n\n\n<p>And so, today, we're revisiting some of the techniques described in <a title='Video iPad Time Lapse Animated GIF via ffmpeg Tutorial' href='#vptlagift'>Video iPad Time Lapse Animated GIF via ffmpeg Tutorial<\/a>  to ...<\/p>\n\n\n\n\n\n<ul>\n\n\n<li>create a video via an iPhone Camera app<\/li>\n\n\n\n\n<li>share via iPhone Photo app Messages option via mobile phone number<\/li>\n\n\n\n\n<li>download to MacBook Air via its Messages (desktop) app and its two finger gesture \"Open\" option (to QuickTime Player in our setup)<\/li>\n\n\n\n\n<li>in QuickTime Player File -&gt; Export As... rolling.mov\n<video style=\"width:100%;\" controls><source src='\/\/www.rjmprogramming.com.au\/Mac\/rolling.mov' type='video\/mp4'><\/source><\/video>\n<\/li>\n\n\n\n\n<li>use <a target=_blank title=ffmpeg href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a> in macOS Terminal application as per ...\n<code>\nffmpeg -i rolling.mov -r 1 rolling-%04d.jpeg\n<\/code>\n<\/li>\n\n\n\n\n<li>find an \"L\" plate amongst images on the net and get it into Paintbrush macOS desktop application via Select\/File -&gt; Copy<\/li>\n\n\n\n\n<li>use Paintbrush macOS desktop application on selected rolling-%04d.jpeg slides to include that \"L\" plate into selected images to File -&gt; Save As... *.jpg<\/li>\n\n\n\n\n<li>on our macOS local <a target=_blank title='MAMP local Apache\/PHP\/MySql web server' href='http:\/\/mamp.info'>MAMP<\/a> (Apache\/PHP\/MySql) web server we access Safari web browser address bar URL<br \/> <i>HTTP:\/\/localhost:8888\/PHP\/animegif\/<a target=_blank title='tutorial_to_animated_gif.php' href='\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php-----------------------------------------------------GETME'>tutorial_to_animated_gif.php<\/a><\/i><br \/> and browse for the relevant images to construct our \"L\" plate animated GIF ... Save As Image rolling.gif\n<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/rolling.gif\"><\/img>\n<\/li>\n\n\n<\/ul>\n\n\n\n\n\n<p>Enjoy a dog's rol<strike style='color:red;text-weight:bold;'>e<\/strike>l!<\/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\/video-to-amended-animated-gif-via-ffmpeg-tutorial\/'>Video to Amended Animated GIF via ffmpeg Tutorial<\/a>.<\/p-->\n<hr>\n<p id='vptlagift'>Previous relevant <a target=_blank title='Video iPad Time Lapse Animated GIF via ffmpeg Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/video-ipad-time-lapse-animated-gif-via-ffmpeg-tutorial\/'>Video iPad Time Lapse Animated GIF via ffmpeg Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/iPad\/nala_timelapse.mov\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Video iPad Time Lapse Animated GIF via ffmpeg Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/iPad\/nala_timelapse.gif\" title=\"Video iPad Time Lapse Animated GIF via ffmpeg Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Video iPad Time Lapse Animated GIF via ffmpeg Tutorial<\/p><\/div>\n<p>We wanted to try out a <i>small<\/i> <a target=_blank title='Time Lapse information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Time-lapse_photography'>Time Lapse<\/a> video &#8230;<\/p>\n<blockquote cite='https:\/\/en.wikipedia.org\/wiki\/Time-lapse_photography'><p>\nTime-lapse photography is a technique whereby the frequency at which film frames are captured (the frame rate) is much more spread out than the frequency used to view the sequence. When played at normal speed, time appears to be moving faster and thus lapsing. For example, an image of a scene may be captured at 1 frame per second, but then played back at 30 frames per second; the result is an apparent 30 times speed increase. In a similar manner, film can also be played at a much lower rate than it was captured at, slowing down an otherwise fast action, as in slow motion or high-speed photography.\n<\/p><\/blockquote>\n<p> &#8230; created with the iPad Camera app &#8220;Video Time Lapse&#8221; option.  <i>Small<\/i> being the operative word.  So <i>small<\/i> in fact, that for a few seconds of video, it is possible to email your video off to an emailee receiver, the tradeoff being that when they play it at many speeds it is likely to play in the jerky fashion &#8230; like with our Nala Time Lapse (iPad Camera app created) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/iPad\/nala_timelapse.mov\" title=\"Click picture\">video below<\/a> &#8230; <\/p>\n<p><video style=\"width:100%;\" controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/iPad\/nala_timelapse.mov' type='video\/mp4'><\/source><\/video><\/p>\n<p> &#8230; which we downloaded to this MacBook Pro that has (the great opensource) <a target=_blank title='ffmpeg' href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a> installed ready to reconstitute some <b>slides from the video<\/b> via &#8230;<\/p>\n<p><code><br \/>\n$ <b>ffmpeg -i nala_timelapse.mov -r 5 nala_image-%04d.jpeg<\/b><br \/>\nffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers<br \/>\n  built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)<br \/>\n  configuration: --prefix=\/usr\/local\/Cellar\/ffmpeg\/4.1.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I\/Library\/Java\/JavaVirtualMachines\/openjdk-11.0.2.jdk\/Contents\/Home\/include -I\/Library\/Java\/JavaVirtualMachines\/openjdk-11.0.2.jdk\/Contents\/Home\/include\/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr<br \/>\n  libavutil      56. 22.100 \/ 56. 22.100<br \/>\n  libavcodec     58. 35.100 \/ 58. 35.100<br \/>\n  libavformat    58. 20.100 \/ 58. 20.100<br \/>\n  libavdevice    58.  5.100 \/ 58.  5.100<br \/>\n  libavfilter     7. 40.101 \/  7. 40.101<br \/>\n  libavresample   4.  0.  0 \/  4.  0.  0<br \/>\n  libswscale      5.  3.100 \/  5.  3.100<br \/>\n  libswresample   3.  3.100 \/  3.  3.100<br \/>\n  libpostproc    55.  3.100 \/ 55.  3.100<br \/>\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from 'nala_timelapse.mov':<br \/>\n  Metadata:<br \/>\n    major_brand     : qt<br \/>\n    minor_version   : 0<br \/>\n    compatible_brands: qt<br \/>\n    creation_time   : 2019-03-10T06:32:49.000000Z<br \/>\n    com.apple.quicktime.location.ISO6709: -33.9074+151.1764+013.000\/<br \/>\n    com.apple.quicktime.make: Apple<br \/>\n    com.apple.quicktime.model: iPad (5th generation)<br \/>\n    com.apple.quicktime.software: 12.1.1<br \/>\n    com.apple.quicktime.creationdate: 2019-03-10T17:32:19+1100<br \/>\n  Duration: 00:00:01.23, start: 0.000000, bitrate: 20015 kb\/s<br \/>\n    Stream #0:0(und): Video: h264 (High) (avc1 \/ 0x31637661), yuvj420p(pc), 1920x1080, 20003 kb\/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)<br \/>\n    Metadata:<br \/>\n      rotate          : 180<br \/>\n      creation_time   : 2019-03-10T06:32:49.000000Z<br \/>\n      handler_name    : Core Media Video<br \/>\n      encoder         : H.264<br \/>\n    Side data:<br \/>\n      displaymatrix: rotation of -180.00 degrees<br \/>\nStream mapping:<br \/>\n  Stream #0:0 -&gt; #0:0 (h264 (native) -&gt; mjpeg (native))<br \/>\nPress [q] to stop, [?] for help<br \/>\nOutput #0, image2, to 'nala_image-%04d.jpeg':<br \/>\n  Metadata:<br \/>\n    major_brand     : qt<br \/>\n    minor_version   : 0<br \/>\n    compatible_brands: qt<br \/>\n    com.apple.quicktime.creationdate: 2019-03-10T17:32:19+1100<br \/>\n    com.apple.quicktime.location.ISO6709: -33.9074+151.1764+013.000\/<br \/>\n    com.apple.quicktime.make: Apple<br \/>\n    com.apple.quicktime.model: iPad (5th generation)<br \/>\n    com.apple.quicktime.software: 12.1.1<br \/>\n    encoder         : Lavf58.20.100<br \/>\n    Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1920x1080, q=2-31, 200 kb\/s, 5 fps, 5 tbn, 5 tbc (default)<br \/>\n    Metadata:<br \/>\n      encoder         : Lavc58.35.100 mjpeg<br \/>\n      creation_time   : 2019-03-10T06:32:49.000000Z<br \/>\n      handler_name    : Core Media Video<br \/>\n    Side data:<br \/>\n      cpb: bitrate max\/min\/avg: 0\/0\/200000 buffer size: 0 vbv_delay: -1<br \/>\n      displaymatrix: rotation of -0.00 degrees<br \/>\nframe=    8 fps=0.0 q=12.5 Lsize=N\/A time=00:00:01.60 bitrate=N\/A dup=0 drop=29 speed=4.67x<br \/>\nvideo:974kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown<br \/>\n$ <b>ls -l nala_image-*.jpeg<br \/>\n-rw-r--r--  1 user  admin  124191 10 Mar 19:36 nala_image-0001.jpeg<br \/>\n-rw-r--r--  1 user  admin  174070 10 Mar 19:36 nala_image-0002.jpeg<br \/>\n-rw-r--r--  1 user  admin  190966 10 Mar 19:36 nala_image-0003.jpeg<br \/>\n-rw-r--r--  1 user  admin  150169 10 Mar 19:36 nala_image-0004.jpeg<br \/>\n-rw-r--r--  1 user  admin  141476 10 Mar 19:36 nala_image-0005.jpeg<br \/>\n-rw-r--r--  1 user  admin   91377 10 Mar 19:36 nala_image-0006.jpeg<br \/>\n-rw-r--r--  1 user  admin   69113 10 Mar 19:36 nala_image-0007.jpeg<br \/>\n-rw-r--r--  1 user  admin   56253 10 Mar 19:36 nala_image-0008.jpeg<\/b><br \/>\n$<br \/>\n<\/code><\/p>\n<p>And then to generate our Animated GIF animation used in today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/iPad\/nala_timelapse.gif\" title=\"Tutorial picture\">blog posting image<\/a> we used the inhouse (with great help as you can read at <a target=_blank title='Animated GIF and Video via PHP Writing PHP Data URI Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/Animated GIF and Video via PHP Writing PHP Data URI Tutorial\/'>Animated GIF and Video via PHP Writing PHP Data URI Tutorial<\/a>) <a target=_blank title='Animated GIF creator' href='http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php'>Animated GIF creator<\/a> &#8230; &#8220;an animation cycle&#8221;.<\/p>\n<p>Read more at <a title='Video via Slide Images and Back Again via ffmpeg Primer Tutorial' href='#vsibapt'>Video via Slide Images and Back Again via ffmpeg Primer Tutorial<\/a> below for more information, especially if you need to install ffmpeg yourself.<\/p>\n<hr>\n<p id='vsibapt'>Previous relevant <a target=_blank title='Video via Slide Images and Back Again via ffmpeg Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/video-via-slide-images-and-back-again-via-ffmpeg-primer-tutorial\/'>Video via Slide Images and Back Again via ffmpeg 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\/Mac\/ants.pdf\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Video via Slide Images and Back Again via ffmpeg Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/ants.jpg\" title=\"Video via Slide Images and Back Again via ffmpeg Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Video via Slide Images and Back Again via ffmpeg Primer Tutorial<\/p><\/div>\n<p>Reading yesterday&#8217;s <a target=_blank title='LibreOffice Spreadsheet via dBase Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/libreoffice-spreadsheet-via-dbase-primer-tutorial\/'>LibreOffice Spreadsheet via dBase Primer Tutorial<\/a> you can&#8217;t say I didn&#8217;t warn you about my interest in ants (and bees)?  Glad you asked?<\/p>\n<p><b><i>Did you know?<\/i><\/b><\/p>\n<ul>\n<li>the queen ant (often just one per ant colony) is not a leader as such in thinking out strategies &#8230; believe it or not &#8230;<\/li>\n<li>it is believed ant colony strategies are worked by what we might call &#8220;groupthink&#8221;<\/li>\n<li>ants march in line often and the scent that the ants leave behind is pheromone, that non-leader ants follow off that left behind by the &#8220;leader ant&#8221; &#8230; ie. &#8220;leader&#8221; of position, rather than &#8220;leader&#8221; of hierarchy<\/li>\n<\/ul>\n<p>So seeing some ants walking in line up a power pole, used an iPhone to capture a very short video (short enough to use the iPhone&#8217;s Photo app&#8217;s Share via Mail (attachment) method of emailing to the MacBook Pro, and then (<a target=_blank title='Gmail' href='http:\/\/gmail.com'>Gmail website<\/a>) downloading) of this, and later, buck the &#8220;ant&#8221; trend, and &#8220;anthropomorphise&#8221; a &#8220;star ant&#8221;, by honing in on an ant in this video and ring it (and its movement) before creating another &#8220;Star Ant Video&#8221;.<\/p>\n<p>There are video editing approaches you could use, but what got us interested was the thought of &#8230;<\/p>\n<ul>\n<li>break the video into its component parts &#8230; just like animations like <a target=_blank href='https:\/\/www.youtube.com\/watch?v=tJBeih6JZrs' title='?'>&#8220;Bugs Bunny&#8221;<\/a> &#8230; a series of (slide, or frame) images<\/li>\n<li>edit those (slide) images to add the (we&#8217;ve decided should be) red ringing of our &#8220;Star Ant&#8221; &#8230; who we&#8217;ve decided you, the user can call whatever you so desire &#8230; aaaaaaarrrrrrr<\/li>\n<li>reconstitute a new video from some new (slide) image components<\/li>\n<\/ul>\n<p>That&#8217;s where one of our favourite Mac Os X friendly media players, which is also a command line &#8220;player&#8221; (yayyyyyy!) comes to the fore, for us.  It&#8217;s the wonderful <a target=_blank title='ffmpeg' href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a> which we&#8217;ve had for a long time now on this MacBook Pro until a disk crash mentioned some weeks back.  Could get it back off restore, but decided to reconsitute &#8230;<\/p>\n<ul>\n<li><a target=_blank title='Xcode IDE information from Apple' href='https:\/\/developer.apple.com\/technologies\/tools\/'>Xcode<\/a> command line tools<\/li>\n<li><a target=_blank title='Homebrew as alternative to Package Manager' href='http:\/\/brew.sh\/'>Homebrew<\/a><\/li>\n<li>ffmpeg<\/li>\n<\/ul>\n<p> &#8230; as a fairly straightforward exercise (given you have Xcode installed already) via a <a target=_blank title='Ren\u00e9 Calles webpage' href='http:\/\/www.renevolution.com\/ffmpeg\/2013\/03\/16\/how-to-install-ffmpeg-on-mac-os-x.html'>How to install FFmpeg on Mac OS X<\/a> webpage by Ren\u00e9 Calles, thanks, heaps, we discovered the commands that worked well for us that go &#8230;<\/p>\n<p><code><br \/>\nruby -e \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)\"<br \/>\nbrew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools<br \/>\n<\/code><\/p>\n<p> &#8230; to (re)install ffmpeg so that, then &#8230;<\/p>\n<p><code><br \/>\nffmpeg -i IMG_0738.MOV -r 1 image-%04d.jpeg<br \/>\n<\/code><\/p>\n<p> &#8230; could create those original 7 (slide) images, though the use of a value bigger than <a target=_blank title='ffmpeg information' href='http:\/\/www.ffmpeg.org\/ffmpeg.html'>1<\/a> frames per second for the &#8220;-r&#8221; switch could be on the cards for your usages.<\/p>\n<p>How to edit those images?  We just used the Mac OS X version of <a target=_blank title='Paintbrush for Mac' href='http:\/\/paintbrush.sourceforge.net\/downloads\/'>PaintBrush<\/a> and lined a lot of these images side by side across the screen to try to track our &#8220;Star Ant&#8221; and award it the &#8220;Red Ellipse PaintBrush Order of Merit&#8221; (for individualism &#8230; tee hee).<\/p>\n<p>Reconstituting the new slides into a new video we remember was another talent of ffmpeg and found this <a target=_blank title='Useful webpage, thanks' href='https:\/\/stackoverflow.com\/questions\/24961127\/how-to-create-a-video-from-images-with-ffmpeg'>useful webpage<\/a>, thanks, on the topic of taking raw (slide) images to create a video via ffmpeg.  Actually, though, we also had our previous very useful <a target=_blank href='#agifvphpwphpdurit' title='Animated GIF and Video via PHP Writing PHP Data URI Tutorial'>Animated GIF and Video via PHP Writing PHP Data URI Tutorial<\/a> (presented below) to turn to to end up with the Mac OS X (Terminal session command line command &#8230;<\/p>\n<p><code><br \/>\nffmpeg -r 1 -i image-%04d.jpg ants.mp4<br \/>\n<\/code><\/p>\n<p>There are no worries with video file &#8220;workings&#8221; to do with uppercase and lowercase and names, so we &#8230;<\/p>\n<p><code><br \/>\ncp IMG_0738.MOV ants.mov<br \/>\n<\/code><\/p>\n<p> &#8230; just for some consistency purposes (and could use &#8220;mv&#8221; to rename instead) so that we can show you &#8230;<\/p>\n<table style=width:100%>\n<tr>\n<th>Before &#8230;<\/th>\n<th>After &#8230; &#8220;Star Ant Video&#8221;<\/th>\n<\/tr>\n<tr>\n<td><video controls type='video\/mp4' style='width:300px;'><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/ants.mov'><\/source><\/video><\/td>\n<td><video controls type='video\/mp4' style='width:300px;'><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/ants.mp4'><\/source><\/video><\/td>\n<\/tr>\n<\/table>\n<p>See a lot of all these goings on at today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/ants.pdf\" title=\"Click picture\">PDF slideshow<\/a>.<\/p>\n<hr>\n<p id='agifvphpwphpdurit'>Previous relevant <a target=_blank title='Animated GIF and Video via PHP Writing PHP Data URI Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-and-video-via-php-writing-php-data-uri-tutorial\/'>Animated GIF and Video via PHP Writing PHP Data URI Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Animated GIF and Video via PHP Writing PHP Data URI Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/video_or_not.jpg\" title=\"Animated GIF and Video via PHP Writing PHP Data URI Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Animated GIF and Video via PHP Writing PHP Data URI Tutorial<\/p><\/div>\n<p>There is a great open source command line application called <a target=_blank title='FFmpeg' href='https:\/\/www.ffmpeg.org\/'>&#8220;FFmpeg&#8221;<\/a> that can create video (or convert video) from image slides (for instance), and so, if we <b>merge functionality for this<\/b> into yesterday&#8217;s <a title='Animated GIF and Slideshow via PHP Writing PHP Data URI Tutorial' href='#agifsphpwphpdurit'>Animated GIF and Slideshow via PHP Writing PHP Data URI Tutorial<\/a> some &#8220;presentation&#8221; styles that our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\" title=\"Click picture\">web application<\/a> can process are now &#8230;<\/p>\n<ul>\n<li>animated GIF<\/li>\n<li>slideshow<\/li>\n<li><b>video<\/b><\/li>\n<\/ul>\n<p>As useful as &#8220;FFmpeg&#8221; is, it is not necessarily a default application existing on web server operating systems like our rjmprogramming.com.au&#8217;s CentOS server.  But we do have it on our Mac OS X (MacBook Pro) operating system&#8217;s command line, so we write our PHP determining whether to &#8230;<\/p>\n<ul>\n<li>create the video data there and then via &#8220;FFmpeg&#8221; and PHP&#8217;s <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php'>exec<\/a> method &#8230; or &#8230;<\/li>\n<li>provide instructions to be able to create the video back at your client computer (that has &#8220;FFmpeg&#8221; perhaps) &#8230; to suit the &#8230;<br \/>\n<code><br \/>\nffmpeg -r 1 -i %03d.jpg video.mp4<br \/>\n<\/code><br \/>\n &#8230; to create a video called video.mp4 with 1 second delays between (input) slides named 001.jpg then 002.jpg then 003.jpg etcetera &#8230; thanks <a target=_blank title='Useful link' href='https:\/\/stackoverflow.com\/questions\/5892308\/create-video-file-using-php'>useful webpage<\/a> for the help &#8230; that in the command line can sometimes be played via &#8230;<br \/>\n<code><br \/>\nopen video.mp4<br \/>\n<\/code><br \/>\n &#8230; or used in some HTML as per &#8230;<br \/>\n<code><br \/>\n&lt;video controls id=ivideo type='video\/mp4'&gt;&lt;source src='video.mp4'&gt;&lt;\/source&gt;&lt;\/video&gt;<br \/>\n<\/code><br \/>\n &#8230; that we show you, below, the Mac OS X local <a target=_blank title='MAMP local Apache\/PHP\/MySql web server' href='http:\/\/mamp.info'>MAMP<\/a> (Apache\/PHP\/MySql) web server running of today&#8217;s PHP to create &#8230;<br \/>\n<video style='width:100%;' controls id=ivideo type='video\/mp4'><source src='http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/vid_eo.mp4'><\/source><\/video>\n<\/li>\n<\/ul>\n<p>If you are a regular at this blog and &#8220;FFmpeg&#8221; sounds a bit familiar to you, that&#8217;s probably because you&#8217;ve read <a target=_blank title='FFmpeg Image Optimization Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-image-optimization-primer-tutorial\/'>FFmpeg Image Optimization Primer Tutorial<\/a> on an earlier occasion <font size=2>&#8230; by candlelight <\/font><font size=1>&#8230; with the lights dimmed?!<\/font><\/p>\n<p>See this in the context of how this PHP <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php----GETME\" title=\"tutorial_to_animated_gif.php\">tutorial_to_animated_gif.php<\/a> code changed for videos in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php----GETME\">this way<\/a> or try it as a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\" title=\"Click picture\">live run<\/a>.<\/p>\n<hr>\n<p id='agifsphpwphpdurit'>Previous relevant <a target=_blank title='Animated GIF and Slideshow via PHP Writing PHP Data URI Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-and-slideshow-via-php-writing-php-data-uri-tutorial\/'>Animated GIF and Slideshow via PHP Writing PHP Data URI Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Animated GIF and Slideshow via PHP Writing PHP Data URI Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/agmore.jpg\" title=\"Animated GIF via PHP Writing PHP Data URI Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Animated GIF and Slideshow via PHP Writing PHP Data URI Tutorial<\/p><\/div>\n<p>To us, there are great similarities between animated GIFs and slideshows, as two forms of &#8220;presentation&#8221;, and so to extend yesterday&#8217;s <a title='Animated GIF via PHP Writing PHP Data URI Tutorial' href='#agifphpwphpdurit'>Animated GIF via PHP Writing PHP Data URI Tutorial<\/a> animated GIF creator &#8220;PHP Writes PHP&#8221; web application that now has the option for <a target=_blank title='Data URI information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Data_URI_scheme'>data URI<\/a> &#8220;exports&#8221; we add the functionality for &#8230;<\/p>\n<ul>\n<li>slideshow creation (using our inhouse methods) which defaults to a horizontal (hashtag type of) navigation &#8230; as well as adding a &#8230;<\/li>\n<li>slideshow creation, with Data URI image data, using functionality as if CSS <a target=_blank title='CSS z-index information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp'>z-index<\/a> (ie. slides stacked on top of each other in <a target=_blank title='Overlay blog postings at this blog' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/overlay'>&#8220;overlay&#8221;<\/a> style) was being used, but actually isn&#8217;t &#8230;<\/li>\n<\/ul>\n<p> &#8230; that little bit different to another &#8220;stacked&#8221; (or z-index feeling) approach we talked about with <a target=_blank title='Multiple Class Slideshow Details Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/multiple-class-slideshow-details-tutorial\/'>Multiple Class Slideshow Details Tutorial<\/a>, where HTML element <a target=_blank title='HTML class information from w3schools' href='http:\/\/www.w3schools.com\/html\/html_classes.asp'>&#8220;class&#8221;<\/a> properties were changed so that the last class defined reflects the look of the slideshow slide desired at any given time.  We just use an array, and a <a target=_blank title='Javascript setTimeout() method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_settimeout.asp'>setTimeout<\/a> timer to achieve the same ends today, with our work (or &#8220;presentation&#8221;).  If this &#8220;horizontal versus stack&#8221; navigation choice interests you, also take a read of <a target=_blank title='HTML Input Element Types Randomized History Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/html-input-element-types-randomized-history-tutorial\/'>HTML Input Element Types Randomized History Tutorial<\/a>.<\/p>\n<p>Again, with all this added functionality, because it is &#8220;hosted&#8221; in an HTML <a target=_blank title='HTML iframe element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_iframe.asp'>iframe<\/a> element all the existant web browser (Windows right click or Mac OS X two finger gesture) functionality can come into play, and make life quite interesting for your non-mobile users &#8220;collecting&#8221; data URIs <font size=1>&#8230; there are worse hobbies!<\/font><\/p>\n<p>You can see this in the context of how this PHP <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php---GETME\" title=\"tutorial_to_animated_gif.php\">tutorial_to_animated_gif.php<\/a> code changed for slideshows in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php---GETME\">this way<\/a> or try it as a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\" title=\"Click picture\">live run<\/a>.<\/p>\n<hr>\n<p id='agifphpwphpdurit'>Previous relevant <a target=_blank title='Animated GIF via PHP Writing PHP Data URI Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-via-php-writing-php-data-uri-tutorial\/'>Animated GIF via PHP Writing PHP Data URI Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Animated GIF via PHP Writing PHP Data URI Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/animegif_datauri.jpg\" title=\"Animated GIF via PHP Writing PHP Data URI Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Animated GIF via PHP Writing PHP Data URI Tutorial<\/p><\/div>\n<p>The previous relevant &#8220;PHP writes PHP&#8221; methodology <a target=_blank title='Animated GIF information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/GIF'>animated GIF<\/a> creator we talked about, first, with <a title='Animated GIF via PHP Writing PHP Primer Tutorial' href='#agvpwppt'>Animated GIF via PHP Writing PHP Primer Tutorial<\/a> came back to mind yesterday with our <a target=_blank title='Missing Javascript Audio on Unmute Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/missing-javascript-audio-on-unmute-tutorial\/'>Missing Javascript Audio on Unmute Tutorial<\/a>, where we pondered on whether an animated GIF could be represented on a webpage by a <a target=_blank title='Data URI information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Data_URI_scheme'>data URI<\/a>.  Why take an interest in this?  Data URIs are very important to do with &#8230;<\/p>\n<ul>\n<li>future mobile development web form navigation benefits from their usage<\/li>\n<li>the use of data URIs make your web pages independent of web server location issues, so make your web data more portable, and flexible<\/li>\n<\/ul>\n<p> &#8230; and ideally, animated GIFs are also not just a decorative part of all this web application usage (as they can be a very efficient representation of an animation that could not be a more succinct way to show that animation or presentation), and if they can be made to be like any other GIF or image data file in the ways they can be represented (and used), then that is all for the good.<\/p>\n<p>So we changed the Jeroen van Wissen&#8217;s <a target=_blank href='http:\/\/www.jeroenvanwissen.nl\/weblog\/php\/howto-generate-animated-gif-with-php' title='Great PHP library for Animated GIF creation work, thanks'>inspired<\/a> PHP (&#8220;PHP writes PHP&#8221; methodology) code <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php--GETME\">tutorial_to_animated_gif.php<\/a> code allow for this extra animated GIF data URI representation in a new additional HTML iframe (containing the animegif.html of code below) that when harnessing existant web browser (Windows right click or Mac OS X two finger gesture) functionality can glean for us, as required, that animated GIF&#8217;s data URI representation.  But don&#8217;t get too excited about this being rocket science, in that with a bit of effort, and PHP, it could have been gleaned <b>from what we already produced<\/b>, in that (in PHP &#8220;land&#8221;) &#8230;<\/p>\n<p><code><br \/>\n$lastbitto=\"\\$fp = fopen('animegif.gif', 'w');<br \/>\n\\$data = \\$gif->GetAnimation();<br \/>\n<b>\\$dataUri = 'data:image\/gif;base64,' . <a target=_blank title='PHP base64_encode information' href='http:\/\/php.net\/manual\/en\/function.base64-encode.php'>base64_encode<\/a>(\\$data);<\/b><br \/>\nfwrite(\\$fp, \\$data);<br \/>\nfclose(\\$fp);<br \/>\n<b>\\$fp = fopen('animegif.html', 'w');<br \/>\nfwrite(\\$fp, '&lt;!doctype html&gt;&lt;html&gt;&lt;body&gt;&lt;h1&gt;Data URI version below&lt;h1&gt;&lt;br&gt;&lt;h4&gt; ... via web browser (Windows right click, Mac OS X two finger gesture ...&lt;\/h4&gt;&lt;br&gt;&lt;img src=' . \\\"\\\\n\\\" . \\$dataUri . \\\"\\\\n\\\" . ' title=DataURI&gt;&lt;\/img&gt;&lt;\/body&gt;&lt;\/html&gt;');<br \/>\nfclose(\\$fp);\";<\/b><br \/>\n<\/code><\/p>\n<p>You can see this in the context of how this PHP code changed in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php--GETME\">this way<\/a> or try it as a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\" title=\"Click picture\">live run<\/a>.<\/p>\n<hr>\n<p id='agvpwppt'>Previous relevant <a target=_blank title='Animated GIF via PHP Writing PHP Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-via-php-writing-php-primer-tutorial\/'>Animated GIF via PHP Writing PHP 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\/PHP\/animegif\/\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Animated GIF via PHP Writing PHP Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/animated_gif-186of.jpg\" title=\"Animated GIF via PHP Writing PHP Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Animated GIF via PHP Writing PHP Primer Tutorial<\/p><\/div>\n<p>We find another very useful reason for PHP to write PHP.  Today we establish a PHP web application to dynamically create Animated GIF images via some still images, like <a target=_blank title='Gifpal' href='http:\/\/www.gifpal.com'>Gifpal<\/a> would do.<\/p>\n<p>We have some great open source PHP code to thank for the basis of the functionality we found at Jeroen van Wissen&#8217;s very <a target=_blank href='http:\/\/www.jeroenvanwissen.nl\/weblog\/php\/howto-generate-animated-gif-with-php'>useful link<\/a>, thanks.<\/p>\n<p>Then we added a more user friendly interface to get the information off the user we need.   We present this in an HTML form, which navigates to the same PHP to do the actual assembly of the Animated GIF via techniques where PHP writes PHP &#8230; and really needs to, to be useful.<\/p>\n<p>Do you remember, last, when we did some PHP writing PHP functionality &#8230; <a target=_blank title='PHP Writes PHP Vertical TextBoxes Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-writes-php-vertical-textboxes-primer-tutorial\/'>PHP Writes PHP Vertical TextBoxes Primer Tutorial<\/a>?<\/p>\n<p>And inside the PHP it makes big use of the <a target=_blank title='GD and Image Functions' href='http:\/\/php.net\/manual\/en\/ref.image.php'>GD and Image Functions<\/a> to read and write the image data we assemble via the user information.<\/p>\n<p>This Animated GIF form of animation is the easiest to implement, as it consists of just the one GIF image file, but the user has very little control over the animation settings, such as the delay between stills, one of the settings we ask about in our web application.<\/p>\n<p>Our PHP source code today you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php_GETME\" title='tutorial_to_animated_gif.php'>tutorial_to_animated_gif.php<\/a> and we redirect you to some live run ideas &#8230;<\/p>\n<ul>\n<li>normal run with HTML form which posts back to itself &#8230; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php\" title='live run'>live run<\/a><\/li>\n<li>example GET parameters <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php?delay=500&#038;stitle=PaintBrush%20Panning%20Primer%20Tutorial&#038;slideshow=http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/index.html\" title='get parameters live run'>run<\/a> (like our tutorial picture)<\/li>\n<\/ul>\n<p>Hope you find this tutorial useful.<\/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='#d17197' onclick='var dv=document.getElementById(\"d17197\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/category\/animation\/\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d17197' 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='#d35097' onclick='var dv=document.getElementById(\"d35097\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/category\/animated-gif\/\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d35097' 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='#d35120' onclick='var dv=document.getElementById(\"d35120\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/slideshow\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d35120' 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='#d35146' onclick='var dv=document.getElementById(\"d35146\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/ffmpeg\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d35146' 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='#d39732' onclick='var dv=document.getElementById(\"d39732\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/video\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d39732' 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='#d44071' onclick='var dv=document.getElementById(\"d44071\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/ffmpeg\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d44071' 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='#d55227' onclick='var dv=document.getElementById(\"d55227\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/slide\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55227' 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='#d55486' onclick='var dv=document.getElementById(\"d55486\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/onmouseover\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55486' 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='#d55491' onclick='var dv=document.getElementById(\"d55491\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/settimeout\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55491' 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='#d55499' onclick='var dv=document.getElementById(\"d55499\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/preview\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55499' 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='#d55503' onclick='var dv=document.getElementById(\"d55503\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/alignment\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55503' 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='#d55516' onclick='var dv=document.getElementById(\"d55516\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/drag\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55516' 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='#d55525' onclick='var dv=document.getElementById(\"d55525\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/text-decoration\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55525' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The &#8220;drag&#8221; about yesterday&#8217;s Video to Amended Animated GIF Drag Slide Swap Tutorial&#8216;s slide swapping functionality was that mobile platforms were left out. Sometimes there is no alternative modus operandi to offer a mobile user, but here, we did not &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/video-to-amended-animated-gif-mobile-slide-swap-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":[72,2073,83,127,211,2380,354,2237,364,446,2208,1608,590,652,3965,3000,3966,861,1661,871,932,983,997,1126,1149,2156,3356,1675,1319],"class_list":["post-55525","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-align","tag-alignment","tag-animated-gif","tag-background-image","tag-click","tag-delay","tag-dom","tag-drag","tag-drag-and-drop","tag-float","tag-getboundingclientrect","tag-hover","tag-image","tag-javascript","tag-justify","tag-long-hover","tag-margin-right","tag-onclick","tag-onmouseout","tag-onmouseover","tag-php","tag-preview","tag-programming","tag-settimeout","tag-slide","tag-swap","tag-text-decoration","tag-textbox","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55525"}],"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=55525"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55525\/revisions"}],"predecessor-version":[{"id":55531,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55525\/revisions\/55531"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=55525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=55525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=55525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}