Transform -> Guillotine" $ext=""; $tablebit=""; $mapbit=""; $lastmt=""; $lasttopoffset=0; $allhtml=false; $vh=""; $iflist=""; $iflistd=""; $affmpeg=""; $aconvert=""; $ainhouseslideshow=""; $bitffmpeg=""; $bitconvert=""; $bitinhouseslideshow=""; $bffmpeg=" "; if (command_exists("ffmpeg") || file_exists("/usr/local/bin/ffmpeg") || is_link("/usr/local/bin/ffmpeg")) { $bffmpeg=str_replace("display:none;","display:INLINE-BLOCK;",$bffmpeg); } $bconvert=" "; if (command_exists("convert") || file_exists("/usr/local/bin/convert") || is_link("/usr/local/bin/convert")) { $bconvert=str_replace("display:none;","display:INLINE-BLOCK;",$bconvert); } $binhouseslideshow=" "; $slideshowtitle = "Slideshow Title"; $zero = "0"; $prewith0 = "youllneverfindthis"; $with0 = "youllneverfindthis"; $prewith = "lastone=0"; $with = "lastone=0"; $firsttd = "@-->"; $lasttd = "-->"; $xtemp=" Slideshow Creator - RJM Programming - December, 2014 $1 Slide 1 of
@--> -->
"; $template = str_replace("$" . "1", $slideshowtitle, str_replace($prewith0, $with0, str_replace($prewith, $with, $xtemp))); function new_content($zfilename) { global $ext; return 'data:image/' . substr($ext,1) . ";base64," . base64_encode(file_get_contents($zfilename)); } function new_pdf($posturl) { global $template, $slideshowtitle, $prewith0, $with0, $prewith, $with, $xtemp, $ext, $iflist, $iflistd, $firsttd, $lasttd; if ($posturl == "") { $posturl=$iflist; } if (strpos($posturl, ",") !== false) { $pref="convert "; $rtopref=""; $exlist = explode(",",$posturl); for ($iy=0; $iy 0) $midbit.='[' . $iy . ':v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v' . $iy . ']; '; $nexttolast.='[v' . $iy . ']'; } if (file_exists('gimp_guillotine.mp4')) { unlink('gimp_guillotine.mp4'); } exec(str_replace(" ./", " " . getcwd() . "/",$pref . $rtopref . ' -filter_complex "' . $midbit . $nexttolast . 'concat=n=' . sizeof($exlist) . ':v=1:a=0,format=yuv420p[v]" -map "[v]" ./gimp_guillotine.mp4')); if (!file_exists('gimp_guillotine.mp4')) { exec(str_replace(" ./", " " . getcwd() . "/","/usr/local/bin/" . $pref . $rtopref . ' -filter_complex "' . $midbit . $nexttolast . 'concat=n=' . sizeof($exlist) . ':v=1:a=0,format=yuv420p[v]" -map "[v]" ./gimp_guillotine.mp4')); } $bimgx=$bimg; if (file_exists('gimp_guillotine.mp4')) { $bimg=" document.getElementById(\"ffmpegc\").src=\"" . 'data:video/mp4;base64,' . base64_encode(file_get_contents('gimp_guillotine.mp4')) . "\"; " . $bimpx; } else { $bimg=" document.getElementById(\"ffmpegc\").src=\"gimp_guillotine.mp4\"; " . $bimpx; echo str_replace(" ./", " " . getcwd() . "/",$pref . $rtopref . ' -filter_complex "' . $midbit . $nexttolast . 'concat=n=' . sizeof($exlist) . ':v=1:a=0,format=yuv420p[v]" -map "[v]" ./gimp_guillotine.mp4'); } } } function new_template($posturl) { global $template, $slideshowtitle, $prewith0, $with0, $prewith, $with, $xtemp, $ext, $iflist, $iflistd, $firsttd, $lasttd; if ($posturl == "") { $posturl=$iflist; } if (strpos($posturl, ",") !== false) { $xtemp = str_replace("lastone=0","lastone=" . (-1 + sizeof(explode(",",$posturl))), $xtemp); $purl = str_replace(",", "@!", $posturl); $with = str_replace("lastone=0", "lastone=" . (strlen($purl) - 1 - strlen(urldecode($_POST['url']))), $with); $exlist = explode(",",$posturl); $zero = sizeof($exlist) - 1; $prewith = "$" . "2.1"; $with = new_content($exlist[0]); $prewith0 = $lasttd; $with0 = str_replace("$" . "2.2", new_content($exlist[1]), $lasttd); if (sizeof($exlist) > 2) { for ($iy=2; $iy' . $recs[$irecs] . ''; } return $outc; } function dotable($pcol,$prow,$pfilename, $pwidth, $pheight, $pbdel,$mt) { global $tablebit, $ext, $lastmt, $includesare; $tvh=""; if (strpos($includesare, $pfilename) !== false || $includesare == '') { $tvh=""; } else { $tvh="visibility:hidden;"; } if (strpos($pbdel,"
") !== false) { //$tablebit=str_replace('','',$tablebit); //$tablebit=str_replace('',''$tablebit); if ($tablebit == "") { $tablebit='
Table view ...
'; } else { $tablebit=str_replace('','',$tablebit); $lastmt=$mt; // thanks to https://stackoverflow.com/questions/24148495/negative-margin-on-table-row } for ($xcol=0; $xcol<$pcol; $xcol++) { $tablebit=str_replace('','',$tablebit); } $tablebit=str_replace('',' ',$tablebit); } else { if ($tablebit == "") { $tablebit='
'; $lastmt=""; } $tablebit=str_replace('',' ',$tablebit); } } function domap($pcol,$prow,$pfilename, $pwidth, $pheight, $pbdel,$pleft,$ptop) { global $mapbit, $lasttopoffset, $includesare; if ($mapbit == "") { if ($lasttopoffset == 0 && $ptop != 0) { $lasttopoffset=$ptop; } $mapbit='
Image Map view ...
'; } if (strpos($includesare, $pfilename) !== false || $includesare == '') { $mapbit=str_replace('','',$mapbit); } } function rettb($tbit) { if ($tbit != "") { return "
Div Margin view ..." . $tbit . "
"; } return ""; } if (!isset($_GET['donothing']) || isset($_POST['filespec']) || isset($_GET['filespec'])) { $img_filelist=""; $gimp_place=""; //$secondbit="
"; $secondbit="

"; $commis=""; $commresult=""; $results=""; $fspec=""; $jscr=""; $imagec=""; $imagex=""; $cwidth="500"; $cheight="500"; $imgd=""; $ifm=""; $thirdbit=""; $fourthbit=""; $none="none"; $below="Image"; $bimg=""; $subject='Perhaps a Gimp Guillotine Image'; $to=''; $headers=''; $via='mycanvas'; $includesare=''; if (isset($_GET['include'])) { $includesare=str_replace("+"," ",urldecode($_GET['include'])); } if (isset($_GET['filespec'])) { $fspec=str_replace("+"," ",urldecode($_GET['filespec'])); if (strpos($fspec, "#") !== false) { $parts=explode("#",$fspec); if (strpos($parts[1],"@") !== false) { if (strpos($parts[1],"+") !== false || strpos($parts[1]," ") !== false) { $allhtml=true; } $to=str_replace(" ","",str_replace("+","",$parts[1])); $fspec=$parts[0]; } } } if (isset($_GET['divmarginuse'])) { $none="INLINE-BLOCK;opacity:0.5;z-index:-6"; $via='topdiv'; } if (isset($_GET['canvas'])) { $bimg=" bimg(true); "; } if (isset($_GET['canvasnorepeat'])) { $bimg=" bimg(false); "; } if (isset($_GET['canvasa'])) { $bimg=" clearalot=true; precanvasanimation(true); canvasanimation(); "; } if (isset($_GET['canvaspa'])) { $bimg=" clearalot=false; precanvasanimation(true); canvasanimation(); "; } if (isset($_GET['canvasnorepeata'])) { $bimg=" clearalot=true; precanvasanimation(false); canvasanimation(); "; } if (isset($_GET['canvasnorepeatpa'])) { $bimg=" clearalot=false; precanvasanimation(false); canvasanimation(); "; } if (isset($_GET['ffmpeg'])) { $bimg=" document.getElementById(\"ffmpega\").click(); "; $affmpeg=" or Video"; $bitffmpeg="
Fade In Fade Out Video view ... +
"; } if (isset($_GET['pdfslideshow'])) { $bimg=" document.getElementById(\"converta\").click(); "; $aconvert=" or PDF"; $bitconvert="
PDF Slideshow view ...
"; } if (isset($_GET['inhouseslideshow'])) { $bimg=" document.getElementById(\"inhouseslideshoww\").src=\"gimp_guillotine.htm?rand=\" + Math.floor(Math.random() * 5465564); document.getElementById(\"inhouseslideshowa\").click(); "; $ainhouseslideshow=" or Slideshow"; $bitinhouseslideshow="
Inhouse Slideshow view ...
"; } if (isset($_POST['inhouseslideshow'])) { $bimg=" document.getElementById(\"inhouseslideshoww\").src=\"gimp_guillotine.htm?rand=\" + Math.floor(Math.random() * 5465564); document.getElementById(\"inhouseslideshowa\").click(); "; $ainhouseslideshow=" or Slideshow"; $bitinhouseslideshow="
Inhouse Slideshow view ...
"; } if (isset($_POST['pdfslideshow'])) { $bimg=" document.getElementById(\"converta\").click(); "; $aconvert=" or PDF"; $bitconvert="
PDF Slideshow view ...
"; } if (isset($_POST['ffmpeg'])) { $bimg=" document.getElementById(\"ffmpega\").click(); "; $affmpeg=" or Video"; $bitffmpeg="
Fade In Fade Out Video view ... +
"; } if (isset($_POST['include'])) { $includesare=str_replace("+"," ",urldecode($_POST['include'])); } if (isset($_POST['filespec'])) { $fspec=str_replace("+"," ",urldecode($_POST['filespec'])); if (strpos($fspec, "#") !== false) { $parts=explode("#",$fspec); if (strpos($parts[1],"@") !== false) { if (strpos($parts[1],"+") !== false || strpos($parts[1]," ") !== false) { $allhtml=true; } $to=str_replace(" ","",str_replace("+","",$parts[1])); $fspec=$parts[0]; } } } if (isset($_POST['divmarginuse'])) { $none="INLINE-BLOCK;opacity:0.5;z-index:-6"; $via='topdiv'; } if (isset($_POST['canvas'])) { $bimg=" bimg(true); "; } if (isset($_POST['canvasnorepeat'])) { $bimg=" bimg(false); "; } if (isset($_POST['canvasa'])) { $bimg=" clearalot=true; precanvasanimation(true); canvasanimation(); "; } if (isset($_POST['canvaspa'])) { $bimg=" clearalot=false; precanvasanimation(true); canvasanimation(); "; } if (isset($_POST['canvasnorepeata'])) { $bimg=" clearalot=true; precanvasanimation(false); canvasanimation(); "; } if (isset($_POST['canvasnorepeatpa'])) { $bimg=" clearalot=false; precanvasanimation(false); canvasanimation(); "; } if (isset($_GET['command']) && isset($_GET['temp_file_list'])) { while ($commresult == "") { exec(str_replace("+"," ",urldecode($_GET['command']))); $commresult=file_get_contents(str_replace("+"," ",urldecode($_GET['temp_file_list']))); if ($commresult == "") { sleep(5); } else { if (strpos($commresult, "-0-0.") !== false) { $prefix=explode("-0-0.", $commresult)[0]; $cr=""; $crd=""; $row="0"; $col="0"; $cnt=0; $bdel="
"; $cumwidth=0; $premargin=""; $margin=""; foreach (glob($prefix . "-*-*.*g*") as $filename) { $vh=""; if (strpos($includesare, $filename) === false && $includesare != "") { $vh="visibility:hidden;"; } $col=explode("-",explode("-", $filename)[-2 + sizeof(explode("-", $filename))])[0]; $ifm=""; if ($below == "Image") $below="Table or Map" . $affmpeg . $aconvert . $ainhouseslideshow . " or Image (or in New Window or Background Image via Canvas (no-repeat) (Progressive Animation (no-repeat)) (Animation (no-repeat)))"; if ($ext == "") $ext="." . explode(".", $filename)[-1 + sizeof(explode(".", $filename))]; list($width, $height, $type, $attr) = getimagesize($filename); $imagec.=$filename . ':' . $width . ':' . $height . ','; if ($imagex == "") { $imagex="'; \n function ios() { \n"; if ("row" == "0") $cwidth=$width; if ("row" == "0") $cheight=$height; $row=explode(".",explode("-", $filename)[-1 + sizeof(explode("-", $filename))])[0]; } else if (explode(".",explode("-", $filename)[-1 + sizeof(explode("-", $filename))])[0] != "$row") { $premargin="margin-top:-" . (explode(".",explode("-", $filename)[-1 + sizeof(explode("-", $filename))])[0] * 6) . "px;"; $cumwidth=0; if (strpos($filename, "-0-" . $row . ".") === false) { if (strpos($thirdbit, "-" . explode(".",explode("-", $filename)[-2 + sizeof(explode("-", $filename))])[0] . "-0" . $ext . "' style='left:") !== false) { $cumwidth=explode("px", explode("-" . explode(".",explode("-", $filename)[-2 + sizeof(explode("-", $filename))])[0] . "-0" . $ext . "' style='left:", $thirdbit)[1])[0]; $margin="margin-"; } } $bdel="
"; $row=explode(".",explode("-", $filename)[-1 + sizeof(explode("-", $filename))])[0]; $cheight+=$height; } else if ("$row" == "0") { $cwidth+=$width; } if (1 == 1) { if ($vh == "") { $iflist.=$iflistd . $filename; $iflistd=","; dotable($col,$row,$filename, $width, $height, $bdel,str_replace('margin-top',' style=margin-top',$premargin)); domap($col,$row,$filename, $width, $height, $bdel,$cumwidth,($cheight - $height)); $thirdbit.=$bdel . "img""; } else { $thirdbit.=$bdel . "img""; } $bdel=""; $margin=""; $cnt++; } else { $imagex.="\n imageo.push(new Image()); \n imageo[eval(-1 + imageo.length)].src='data:image/" . substr($ext,1) . ";base64," . base64_encode(file_get_contents($filename)) . "'; \n"; } $cumwidth+=$width; if ($jscr == "") $jscr="\n if (imagec == ',') { dur=dur; "; $jscr.="\n imagec+='" . $filename . ",'; imageo.push(new Image()); imageo[eval(-1 + imageo.length)].onload = function () { imagec = imagec.replace('," . $filename . ",', '," . $filename . ":' + eval(('' + this.width).replace('px','')) + ':' + eval(('' + this.height).replace('px','')) + ','); }; imageo[eval(-1 + imageo.length)].src='" . $filename . "'; \n"; $cr.=$crd . $filename; $crd="\n"; } if (isset($_GET['inhouseslideshow']) || isset($_POST['inhouseslideshow'])) { new_template(""); } if (isset($_GET['ffmpeg']) || isset($_POST['ffmpeg'])) { new_video(""); } if (isset($_GET['pdfslideshow']) || isset($_POST['pdfslideshow'])) { new_pdf(""); } $mapbit=str_replace(' width="" height=""',' width="' . $cwidth . '" height="' . $cheight . '"',$mapbit); if ($imagex != "") $imagex.="\n } \n imagec+='"; if ($jscr != "") $jscr.=" \n } \n if (imagec != ',') { lookati(); } \n"; echo ""; exit; } } } } else if (isset($_POST['filespec']) || $fspec != "") { $dcr=""; $cr=""; $crd=""; $col="0"; $row="0"; $cnt=0; if ($fspec == "") { $fspec=str_replace("+"," ",urldecode($_POST['filespec'])); } $bdel="
"; $cumwidth=0; $premargin=""; $margin=""; foreach (glob($fspec) as $filename) { $vh=""; if (strpos($includesare, $filename) === false && $includesare != "") { $vh="visibility:hidden;"; } $col=explode("-",explode("-", $filename)[-2 + sizeof(explode("-", $filename))])[0]; $ifm=""; if ($below == "Image") $below="Table or Map" . $affmpeg . $aconvert . $ainhouseslideshow . " or Image (or in New Window or Background Image via Canvas (no-repeat) (Progressive Animation (no-repeat)) (Animation (no-repeat)))"; if ($ext == "") $ext="." . explode(".", $filename)[-1 + sizeof(explode(".", $filename))]; if ($jscr == "") $jscr="\n if (imagec == ',') { dur=dur; "; list($width, $height, $type, $attr) = getimagesize($filename); $imagec.=$filename . ':' . $width . ':' . $height . ','; if ($imagex == "") { $imagex="'; \n function ios() { \n"; if ("row" == "0") $cwidth=$width; if ("row" == "0") $cheight=$height; $row=explode(".",explode("-", $filename)[-1 + sizeof(explode("-", $filename))])[0]; } else if (explode(".",explode("-", $filename)[-1 + sizeof(explode("-", $filename))])[0] != "$row") { $premargin="margin-top:-" . (explode(".",explode("-", $filename)[-1 + sizeof(explode("-", $filename))])[0] * 6) . "px;"; $cumwidth=0; if (strpos($filename, "-0-" . $row . ".") === false) { if (strpos($thirdbit, "-" . explode(".",explode("-", $filename)[-2 + sizeof(explode("-", $filename))])[0] . "-0" . $ext . "' style='left:") !== false) { $cumwidth=explode("px", explode("-" . explode(".",explode("-", $filename)[-2 + sizeof(explode("-", $filename))])[0] . "-0" . $ext . "' style='left:", $thirdbit)[1])[0]; $margin="margin-"; } } $bdel="
"; $row=explode(".",explode("-", $filename)[-1 + sizeof(explode("-", $filename))])[0]; $cheight+=$height; } else if ("$row" == "0") { $cwidth+=$width; } if (1 == 1) { if ($vh == "") { $iflist.=$iflistd . $filename; $iflistd=","; dotable($col,$row,$filename, $width, $height, $bdel,str_replace('margin-top',' style=margin-top',$premargin)); domap($col,$row,$filename, $width, $height, $bdel,$cumwidth,($cheight - $height)); $thirdbit.=$bdel . "img""; } else { $thirdbit.=$bdel . "img""; } $bdel=""; $margin=""; $cnt++; } else { $imagex.="\n imageo.push(new Image()); \n imageo[eval(-1 + imageo.length)].src='data:image/" . substr($ext,1) . ";base64," . base64_encode(file_get_contents($filename)) . "'; \n"; } $cumwidth+=$width; if (1 == 2) $jscr.="\n imagec+='" . $filename . ",'; imageo.push(new Image()); imageo[eval(-1 + imageo.length)].onload = function () { imagec = imagec.replace('," . $filename . ",', '," . $filename . ":' + eval(('' + this.width).replace('px','')) + ':' + eval(('' + this.height).replace('px','')) + ','); }; imageo[eval(-1 + imageo.length)].src='" . $filename . "'; \n"; $cr.=$crd . $filename; $dcr.=$crd . "" . $filename . ""; $crd="\n"; } if (isset($_GET['inhouseslideshow']) || isset($_POST['inhouseslideshow'])) { new_template(""); } if (isset($_GET['ffmpeg']) || isset($_POST['ffmpeg'])) { new_video(""); } if (isset($_GET['pdfslideshow']) || isset($_POST['pdfslideshow'])) { new_pdf(""); } $mapbit=str_replace(' width="" height=""',' width="' . $cwidth . '" height="' . $cheight . '"',$mapbit); if ($imagex != "") $imagex.="\n } \n imagec+='"; if ($jscr != "") $jscr.=" \n } \n if (imagec != ',') { lookati(); } \n"; //$jscr.="\n alert(imagec); \n"; //$jscr.="\n alert(imagec); \n"; if ($cr == "") { //echo ""; //exit; $results=" "; //$secondbit="
"; $secondbit="

"; } else { //echo ""; //exit; $results=$cr; //$secondbit="
" . str_replace("\n","
",$dcr) . "

"; //"; // . $thirdbit . ""; $secondbit="

" . str_replace("\n","
",$dcr) . "

"; } if ($to != "" && !$allhtml) { $eol = PHP_EOL; $headers = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $headers .= 'Reply-To: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $filname="gimp_guillotine.html"; $content = chunk_split(base64_encode( "" . str_replace("margin-top:-","margin-top:0.00",str_replace("margin-top: ","margin-top:",$thirdbit)) . "" )); //$uid = md5(uniqid(time())); // a random hash will be necessary to send mixed content $separator = md5(time()); $headers .= "MIME-Version: 1.0" . $eol; $headers .= "Content-Type: multipart/mixed; boundary=\"" . $separator . "\"" . $eol . $eol; $headers .= "Content-Transfer-Encoding: 7bit" . $eol; $headers .= "This is a MIME encoded message." . $eol . $eol; // message $headers .= "--" . $separator . $eol; $headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"" . $eol; $headers .= "Content-Transfer-Encoding: 8bit" . $eol . $eol; $headers .= "Please see attachment below:" . $eol . $eol; //ourpremail($tem, $mysubject, "", $headers . "--" . $separator . "--"); // attachment $headers .= "--" . $separator . $eol; $headers .= "Content-Type: application/octet-stream; name=\"" . $filname . "\"" . $eol; $headers .= "Content-Transfer-Encoding: base64" . $eol; $headers .= "Content-Disposition: attachment;filename=\"" . $filname . "\"" . $eol; $headers .= $content . $eol . $eol; $headers .= "--" . $separator . "--"; //mail($to, $subject, "", $headers); } } if (file_exists("../../GIMP.app/Contents/MacOS/Gimp")) { $gimp_place="../../GIMP.app/Contents/MacOS/Gimp"; } else if (file_exists("/Applications/GIMP.app/Contents/MacOS/Gimp")) { $gimp_place="/Applications/GIMP.app/Contents/MacOS/Gimp"; } if ($ifm != "") { $ifm=""; } if ($gimp_place == "") { $hecho=" GIMP Guillotine Follow Up - RJM Programming - August, 2018 var includesare='" . $includesare . "'; var dur=''; var clearalot=false; var canvascset=[]; var icanvascset=0; var lookatidone=false; var elem=null; var context=null; var ext='" . $ext . "'; var results=''; var imageo=new Array(); var imagec='," . $imagec . $imagex . "'; /" . "/ var imagec=',./mondrian-1504681_640-0-0.png;133;146,./mondrian-1504681_640-1-0.png;164;146,./mondrian-1504681_640-2-0.png;343;146,./mondrian-1504681_640-2-1.png;343;145,./mondrian-1504681_640-2-2.png;343;189,'; function precanvasanimation(dobr) { icanvascset=0; if (dobr) document.body.style.backgroundRepeat='repeat'; if (!dobr) document.body.style.backgroundRepeat='no-repeat'; } function canvasanimation() { if (canvascset.length > 0 && icanvascset >= 0) { if (icanvascset <= 0) { icanvascset=0; context.clearRect(0, 0, elem.width, elem.height); eval(canvascset[0]); document.body.style.backgroundImage=\"url('\" + elem.toDataURL() + \"')\"; icanvascset++; if (clearalot) { setTimeout(canvasanimation, 600); } else { setTimeout(canvasanimation, 3000); } } else if (icanvascset > canvascset.length) { icanvascset=0; if (clearalot) { setTimeout(canvasanimation, 1200); } else { setTimeout(canvasanimation, 6000); } } else { if (clearalot) context.clearRect(0, 0, elem.width, elem.height); eval(canvascset[icanvascset]); document.body.style.backgroundImage=\"url('\" + elem.toDataURL() + \"')\"; icanvascset++; if (clearalot) { setTimeout(canvasanimation, 600); } else { setTimeout(canvasanimation, 3000); } } } else if (canvascset.length > 0) { icanvascset=0; } } function butwhatif(icolid) { if (document.URL.toLowerCase().indexOf('http') == -1) { document.getElementById('icolthree').src=document.getElementById(icolid).src; document.getElementById('icolthree').style.display='block'; } } function bimg(dobr) { icanvascset=-1; if (dobr) document.body.style.backgroundRepeat='repeat'; if (!dobr) document.body.style.backgroundRepeat='no-repeat'; document.body.style.backgroundImage=\"url('\" + dur + \"')\"; } function showthese() { var osel=document.getElementById('tresults'); var cinc='', cincd=''; for (var i=0; i' + recs[irecs] + ''; } document.getElementById('tresults').size='' + recs.length; return outc; } function doopen(wois) { location.href='#' + wois.id.substring(0,eval(wois.id.length - 1)) + 'd'; document.getElementById(wois.id.substring(0,eval(-1 + wois.id.length)) + 'd').open=true; } function ourdocumentgetElementById(huh) { var isa=document.getElementsByTagName('img'); for (var jsa=0; jsa margin { 0 0 0 0 } padding { 0 0 0 0 } ' + document.getElementById('topdiv').innerHTML.replace(/\-top\:\ /g,'-top:').replace(/\-top\:\-/g,'-top:0.00')); } function dodur() { var iob=new Image(); if (dur == '') { dur=document.getElementById('dhuh').innerHTML; } if (dur == '') { if (parent.document.getElementById('dhuh')) { dur=parent.document.getElementById('dhuh').innerHTML; } } //alert('DuR=' + dur); iob.onload = function () { //alert(11); elem=document.getElementById('mycanvas'); //alert(111); context=elem.getContext('2d'); //alert(1111); context.drawImage(this,0,0); //alert(21111); }; iob.src=dur; } function lookati() { if (!lookatidone) { lookatidone=true; //document.title='5'; // ios(); //document.title='51'; //alert('-0-0' + ext + ': In ' + imagec); elem.style.display='block'; var myimagec=imagec; imagec=','; var pfix=myimagec.split('-0-0' + ext + ':')[0].split(',')[eval(-1 + myimagec.split('-0-0' + ext + ':')[0].split(',').length)]; // var iis=myimagec.split(','); var icol=0, irow=0, top=0, left=0, cumtop=0, cumleft=0, fwidth=0, fheight=0, thisw=0, thish=0, thisws=[]; while (myimagec.indexOf('-' + irow + ext + ':') != -1) { if (myimagec.indexOf('-' + irow + ext + ':') != -1) { if (myimagec.indexOf('-' + icol + '-' + irow + ext + ':') != -1) { thisw=eval(myimagec.split('-' + icol + '-' + irow + ext + ':')[1].split(':')[0]); thish=eval(myimagec.split('-' + icol + '-' + irow + ext + ':')[1].split(':')[1].split(',')[0]); //alert(eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)); if (ourdocumentgetElementById('img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length))) { //ourdocumentgetElementById('img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)).style.position='absolute'; //ourdocumentgetElementById('img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)).style.top='' + top + 'px'; //ourdocumentgetElementById('img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)).style.left='' + left + 'px'; try { if (includesare.indexOf('-' + icol + '-' + irow + ext) != -1 || includesare == '') { canvascset.push(\"context.drawImage(ourdocumentgetElementById('img\" + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length) + \"'), \" + left + \",\" + top + \");\"); context.drawImage(ourdocumentgetElementById('img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)), left, top); } } catch(ee) { alert(ee.message); } //alert('-' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)); } else { if (includesare.indexOf('-' + icol + '-' + irow + ext) != -1 || includesare == '') { canvascset.push(\"context.drawImage(imageo[\" + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length) + \"], \" + left + \",\" + top + \");\"); context.drawImage(imageo[eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)], left, top); } } //document.title+='context.drawImage(z[' + (-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length) + '],' + top + ',' + left + ')'; myimagec=myimagec.replace('-' + icol + '-' + irow + ext + ':','_' + icol + '_' + irow + ext + ':'); left+=thisw; thisws.push(thisw); if (myimagec.indexOf('-' + irow + ext + ':') == -1) { icol=-1; irow++; top+=thish; left=0; } } else { left+=thisws[icol]; } icol++; } else { icol=0; irow++; top+=thish; left=0; } } if (elem) { dur=elem.toDataURL(); document.getElementById('mapi').src=dur; document.getElementById('dhuh').innerHTML=dur; //dodur(); } //alert('dur=' + dur); //document.body.style.backgroundImage=\"url('\" + dur + \"')\"; if (document.URL.indexOf('divmarginuse=') != -1) { document.getElementById('topdiv').style.display='INLINE-BLOCK'; dodur(); } } } function prelook() { if (!elem) { if (document.getElementById('mycanvas')) { elem=document.getElementById('mycanvas'); context=elem.getContext('2d'); } } //if (imagec != ',') { lookati(); } } function looknow() { if (dur == '') { results=document.getElementById('results').innerHTML; if (results == '' || (results.indexOf('.') == -1 && results.indexOf(' ') == -1)) { setTimeout(looknow,5000); } else if ((results + ',').substring(0,1) == ' ') { alert('No files found in ' + document.getElementById('filespec').value + ' ... Please try again'); document.getElementById('filespec').value=''; } else { document.getElementById('tresults').innerHTML=resultsel(results); document.getElementById('tresults').style.display='block'; } } " . $jscr . " }
" . str_replace(" id=", " data-id=",$thirdbit) . "

GIMP Guillotine Follow Up

RJM Programming - August, 2018



Input Images

GIMP Guillotine Image Filespec (of images):

       " . $bffmpeg . $bconvert . $binhouseslideshow . "



HTML Use of Input " . $below . " List Below

" . $secondbit . $ifm . "
Canvas (and animations) view ...
" . rettb($thirdbit) . "" . $tablebit . $mapbit . $bitffmpeg . $bitconvert . $bitinhouseslideshow . ""; if ($allhtml) { $eol = PHP_EOL; $headers = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $headers .= 'Reply-To: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $filname="gimp_guillotine.html"; $content = chunk_split(base64_encode($hecho)); //$uid = md5(uniqid(time())); // a random hash will be necessary to send mixed content $separator = md5(time()); $headers .= "MIME-Version: 1.0" . $eol; $headers .= "Content-Type: multipart/mixed; boundary=\"" . $separator . "\"" . $eol . $eol; $headers .= "Content-Transfer-Encoding: 7bit" . $eol; $headers .= "This is a MIME encoded message." . $eol . $eol; // message $headers .= "--" . $separator . $eol; $headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"" . $eol; $headers .= "Content-Transfer-Encoding: 8bit" . $eol . $eol; $headers .= "Please see attachment below:" . $eol . $eol; //ourpremail($tem, $mysubject, "", $headers . "--" . $separator . "--"); // attachment $headers .= "--" . $separator . $eol; $headers .= "Content-Type: application/octet-stream; name=\"" . $filname . "\"" . $eol; $headers .= "Content-Transfer-Encoding: base64" . $eol; $headers .= "Content-Disposition: attachment;filename=\"" . $filname . "\"" . $eol; $headers .= $content . $eol . $eol; $headers .= "--" . $separator . "--"; //mail($to, $subject, "", $headers); } echo $hecho; if ($to != '' && $headers != '') { mail($to, $subject, "", $headers); } exit; } else if (isset($_GET['gimp'])) { exec($gimp_place); exit; } else { $temp_file_list = tempnam(sys_get_temp_dir(), 'myfile.list'); exec("echo '' > " . $temp_file_list); $temp_file = tempnam(sys_get_temp_dir(), 'myfile.name'); exec("echo '' > " . $temp_file); //echo $temp_file; if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $commis="forfiles /P C:\\ /M *-0-0.*g* /S /D -0 2> nul > " . $temp_file_list; } else { $commis="find / -name '*-0-0.*g*' -type f -newer " . $temp_file . " -print 2> /dev/null > " . $temp_file_list; } $hecho=" GIMP Guillotine Follow Up - RJM Programming - August, 2018 var includesare='" . $includesare . "'; var clearalot=false; var canvascset=[]; var icanvascset=0; var dur=''; var lookatidone=false; var elem=null; var context=null; var ext='" . $ext . "'; var results=''; var imageo=new Array(); var imagec='," . $imagec . $imagex . "'; function precanvasanimation(dobr) { icanvascset=0; if (dobr) document.body.style.backgroundRepeat='repeat'; if (!dobr) document.body.style.backgroundRepeat='no-repeat'; } function canvasanimation() { if (canvascset.length > 0 && icanvascset >= 0) { if (icanvascset <= 0) { icanvascset=0; context.clearRect(0, 0, elem.width, elem.height); eval(canvascset[0]); document.body.style.backgroundImage=\"url('\" + elem.toDataURL() + \"')\"; icanvascset++; if (clearalot) { setTimeout(canvasanimation, 600); } else { setTimeout(canvasanimation, 3000); } } else if (icanvascset > canvascset.length) { icanvascset=0; if (clearalot) { setTimeout(canvasanimation, 1200); } else { setTimeout(canvasanimation, 6000); } } else { if (clearalot) context.clearRect(0, 0, elem.width, elem.height); eval(canvascset[icanvascset]); document.body.style.backgroundImage=\"url('\" + elem.toDataURL() + \"')\"; icanvascset++; if (clearalot) { setTimeout(canvasanimation, 600); } else { setTimeout(canvasanimation, 3000); } } } else if (canvascset.length > 0) { icanvascset=0; } } function butwhatif(icolid) { if (document.URL.toLowerCase().indexOf('http') == -1) { document.getElementById('icolthree').src=document.getElementById(icolid).src; document.getElementById('icolthree').style.display='block'; } } function bimg(dobr) { icanvascset=-1; if (dobr) document.body.style.backgroundRepeat='repeat'; if (!dobr) document.body.style.backgroundRepeat='no-repeat'; document.body.style.backgroundImage=\"url('\" + dur + \"')\"; } function showthese() { var osel=document.getElementById('tresults'); var cinc='', cincd=''; for (var i=0; i' + recs[irecs] + ''; } document.getElementById('tresults').size='' + recs.length; return outc; } function doopen(wois) { location.href='#' + wois.id.substring(0,eval(wois.id.length - 1)) + 'd'; document.getElementById(wois.id.substring(0,eval(-1 + wois.id.length)) + 'd').open=true; } function ourdocumentgetElementById(huh) { var isa=document.getElementsByTagName('img'); for (var jsa=0; jsa margin { 0 0 0 0 } padding { 0 0 0 0 } ' + document.getElementById('topdiv').innerHTML.replace(/\-top\:\ /g,'-top:').replace(/\-top\:\-/g,'-top:0.00')); } function lookati() { if (!lookatidone) { lookatidone=true; //document.title='54'; // ios(); //document.title='154'; //alert('-0-0' + ext + ': in ' + imagec); elem.style.display='block'; var myimagec=imagec; imagec=','; var pfix=myimagec.split('-0-0' + ext + ':')[0].split(',')[eval(-1 + myimagec.split('-0-0' + ext + ':')[0].split(',').length)]; // alert(pfix); // var iis=myimagec.split(','); var icol=0, irow=0, top=0, left=0, cumtop=0, cumleft=0, fwidth=0, fheight=0, thisw=0, thish=0, thisws=[]; while (myimagec.indexOf('-' + irow + ext + ':') != -1) { if (myimagec.indexOf('-' + irow + ext + ':') != -1) { if (myimagec.indexOf('-' + icol + '-' + irow + ext + ':') != -1) { thisw=eval(myimagec.split('-' + icol + '-' + irow + ext + ':')[1].split(':')[0]); thish=eval(myimagec.split('-' + icol + '-' + irow + ext + ':')[1].split(':')[1].split(',')[0]); //document.title+='-' + 'img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length); //alert(eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)); if (ourdocumentgetElementById('img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length))) { //ourdocumentgetElementById('img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)).style.position='absolute'; //ourdocumentgetElementById('img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)).style.top='' + top + 'px'; //ourdocumentgetElementById('img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)).style.left='' + left + 'px'; try { if (includesare.indexOf('-' + icol + '-' + irow + ext) != -1 || includesare == '') { canvascset.push(\"context.drawImage(ourdocumentgetElementById('img\" + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length) + \"'), \" + left + \",\" + top + \");\"); context.drawImage(ourdocumentgetElementById('img' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)), left, top); } } catch(ee) { alert(ee.message); } //alert('--' + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)); } else { if (includesare.indexOf('-' + icol + '-' + irow + ext) != -1 || includesare == '') { canvascset.push(\"context.drawImage(imageo[\" + eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length) + \"], \" + left + \",\" + top + \");\"); context.drawImage(imageo[eval(-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length)], left, top); } } //document.title+='context.drawImage(x[' + (-1 + myimagec.split(',' + pfix + '-' + icol + '-' + irow + ext)[0].split(',').length) + '],' + top + ',' + left + ')'; myimagec=myimagec.replace('-' + icol + '-' + irow + ext + ':','_' + icol + '_' + irow + ext + ':'); //alert(document.title); left+=thisw; thisws.push(thisw); if (myimagec.indexOf('-' + irow + ext + ':') == -1) { icol=-1; irow++; top+=thish; left=0; } } else { left+=thisws[icol]; } icol++; } else { icol=0; irow++; top+=thish; left=0; } } if (elem) { dur=elem.toDataURL(); document.getElementById('mapi').src=dur; document.getElementById('dhuh').innerHTML=dur; //dodur(); } //alert('Dur=' + dur); //document.body.style.backgroundImage=\"url('\" + dur + \"')\"; if (document.URL.indexOf('divmarginuse=') != -1) { document.getElementById('topdiv').style.display='INLINE-BLOCK'; dodur(); } } } function prelook() { if (!elem) { if (document.getElementById('mycanvas')) { elem=document.getElementById('mycanvas'); context=elem.getContext('2d'); //alert('/' + imagec); } } //if (imagec != ',') { lookati(); } } function looknow() { if (dur == '') { results=document.getElementById('results').innerHTML; if (results == '' || (results.indexOf('.') == -1 && results.indexOf(' ') == -1)) { setTimeout(looknow,5000); } else if ((results + ',').substring(0,1) == ' ') { alert('No files found in ' + document.getElementById('filespec').value + ' ... Please try again'); document.getElementById('filespec').value=''; } else { document.getElementById('tresults').innerHTML=resultsel(results); document.getElementById('tresults').style.display='block'; } } " . $jscr . " }
" . str_replace(" id=", " data-id=",$thirdbit) . "

GIMP Guillotine Follow Up

RJM Programming - August, 2018



Input Images

GIMP Guillotine Image Filespec (of images): ... Versus ...

       " . $bffmpeg . $bconvert . $binhouseslideshow . "



HTML Use of Input " . $below . " List Below

" . $secondbit . $ifm . "
Canvas (and animations) view ...
" . rettb($thirdbit) . "" . $tablebit . $mapbit . $bitffmpeg . $bitconvert . $bitinhouseslideshow . " "; if ($allhtml) { $eol = PHP_EOL; $headers = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $headers .= 'Reply-To: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $filname="gimp_guillotine.html"; $content = chunk_split(base64_encode($hecho)); //$uid = md5(uniqid(time())); // a random hash will be necessary to send mixed content $separator = md5(time()); $headers .= "MIME-Version: 1.0" . $eol; $headers .= "Content-Type: multipart/mixed; boundary=\"" . $separator . "\"" . $eol . $eol; $headers .= "Content-Transfer-Encoding: 7bit" . $eol; $headers .= "This is a MIME encoded message." . $eol . $eol; // message $headers .= "--" . $separator . $eol; $headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"" . $eol; $headers .= "Content-Transfer-Encoding: 8bit" . $eol . $eol; $headers .= "Please see attachment below:" . $eol . $eol; //ourpremail($tem, $mysubject, "", $headers . "--" . $separator . "--"); // attachment $headers .= "--" . $separator . $eol; $headers .= "Content-Type: application/octet-stream; name=\"" . $filname . "\"" . $eol; $headers .= "Content-Transfer-Encoding: base64" . $eol; $headers .= "Content-Disposition: attachment;filename=\"" . $filname . "\"" . $eol; $headers .= $content . $eol . $eol; $headers .= "--" . $separator . "--"; //mail($to, $subject, "", $headers); } echo $hecho; } if ($to != '' && $headers != '') { mail($to, $subject, "", $headers); } exit; } else { exit; } ?>