9,14c9
<
< function less($ins) {
< return str_replace(".","",str_replace(substr("\\",0,1),"",str_replace("/","",$ins)));
< }
<
< if (!isset($_GET['donothing']) || isset($_POST['filespec']) || isset($_GET['filespec'])) {
---
> if (!isset($_GET['donothing']) || isset($_POST['filespec'])) {
22,35d16
< $jscr="";
< $imagec="";
< $imagex="";
< $cwidth="500";
< $cheight="500";
< $imgd="";
< $thirdbit="";
< $fourthbit="";
< $none="none";
< $below="Image";
< $ext="";
< if (isset($_GET['filespec'])) { $fspec=str_replace("+"," ",urldecode($_GET['filespec'])); }
< if (isset($_GET['divmarginuse'])) { $none="INLINE-BLOCK;opacity:0.5;z-index:-6"; }
<
48,53d28
< $row="0";
< $cnt=0;
< $bdel="
";
< $cumwidth=0;
< $premargin="";
< $margin="";
55,96d29
< if ($below == "Image") $below="Image (or in New Window)";
< 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) {
< $thirdbit.=$bdel . "
";
< $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 == ',') { ";
< $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";
100,101d32
< if ($imagex != "") $imagex.="\n } \n imagec+='";
< if ($jscr != "") $jscr.=" \n } \n if (imagec != ',') { lookati(); } \n";
107c38
< } else if (isset($_POST['filespec']) || $fspec != "") {
---
> } else if (isset($_POST['filespec'])) {
111,117c42
< $row="0";
< $cnt=0;
< if ($fspec == "") { $fspec=str_replace("+"," ",urldecode($_POST['filespec'])); }
< $bdel="
";
< $cumwidth=0;
< $premargin="";
< $margin="";
---
> $fspec=str_replace("+"," ",urldecode($_POST['filespec']));
119,160d43
< if ($below == "Image") $below="Image (or in New Window)";
< if ($ext == "") $ext="." . explode(".", $filename)[-1 + sizeof(explode(".", $filename))];
< if ($jscr == "") $jscr="\n if (imagec == ',') { ";
< 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) {
< $thirdbit.=$bdel . "
";
< $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";
165,168d47
< 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";
178c57
< $secondbit="
| " . str_replace("\n"," ",$dcr) . " | |
"; //"; // . $thirdbit . "";
---
> $secondbit="
| " . str_replace("\n"," ",$dcr) . " | |
";
190,313c69,72
<
<
< GIMP Guillotine Follow Up - RJM Programming - August, 2018
<
<
< var dur='';
< 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 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);
< 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) return;
< 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 {
< 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 {
< 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('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';
< }
< }
< function prelook() {
< if (!elem) {
< if (document.getElementById('mycanvas')) {
< elem=document.getElementById('mycanvas');
< context=elem.getContext('2d');
< }
< }
< if (imagec != ',') { lookati(); }
< }
---
>
>
>
> var results=''
324d82
< } " . $jscr . "
326,339c84,97
<
<
<
< " . str_replace(" id=", " data-id=",$thirdbit) . "
< " . $results . "
< GIMP Guillotine Follow Up
< RJM Programming - August, 2018
< Input Images
<
<
< HTML Use of Input " . $below . " List Below
" . $secondbit . "" . $thirdbit . "";
---
> }
>
>
>
> " . $results . "
> GIMP Guillotine Follow Up
> RJM Programming - August, 2018
> Input Images
>
>
> HTML Use of Input Image List Below
" . $secondbit . "";
349,351d106
< 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 {
353d107
< }
356,481c110,113
<
<
< GIMP Guillotine Follow Up - RJM Programming - August, 2018
<
<
< 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 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) return;
< 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 {
< 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 {
< 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('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';
< }
< }
< function prelook() {
< if (!elem) {
< if (document.getElementById('mycanvas')) {
< elem=document.getElementById('mycanvas');
< context=elem.getContext('2d');
< //alert('/' + imagec);
< }
< }
< if (imagec != ',') { lookati(); }
< }
---
>
>
>
> var results=''
492d123
< } " . $jscr . "
494,507c125,138
<
<
<
< " . str_replace(" id=", " data-id=",$thirdbit) . "
< " . $results . "
< GIMP Guillotine Follow Up
< RJM Programming - August, 2018
< Input Images
<
<
< HTML Use of Input " . $below . " List Below
" . $secondbit . "" . $thirdbit . "";
---
> }
>
>
>
> " . $results . "
> GIMP Guillotine Follow Up
> RJM Programming - August, 2018
> Input Images
>
>
> HTML Use of Input Image List Below
" . $secondbit . "";