SilverHood Apps's solution to "PHP script Image merge"

If nothing works, replace the code block at line 88<\/p>\n

else<\/span> <\/span>if<\/span> <\/span>(<\/span>$<\/span>myReturnType<\/span> <\/span>==<\/span> <\/span>2<\/span>)<\/span> <\/span>{<\/span>  <\/span>//<\/span> <\/span>output<\/span> <\/span>to<\/span> <\/span>browser<\/span> <\/span>as<\/span> <\/span>data<\/span> <\/span>URI<\/span>\n    <\/span>header<\/span>(<\/span>&<\/span>quot<\/span>;<\/span>Content<\/span>-<\/span>Type:<\/span> <\/span>image<\/span>/<\/span>jpeg&quot<\/span>;);<\/span>\n    <\/span>imagejpeg<\/span>(<\/span>$<\/span>image_1<\/span>,<\/span> <\/span>NULL<\/span>,<\/span> <\/span>$<\/span>myQuality<\/span>);<\/span>\n    <\/span>debug_to_console<\/span>(<\/span>&<\/span>quot<\/span>;<\/span>2<\/span>&<\/span>quot<\/span>;);<\/span>\n}<\/span>\n<\/pre><\/div>\n

with<\/p>\n

else<\/span> <\/span>if<\/span> <\/span>(<\/span>$<\/span>myReturnType<\/span> <\/span>==<\/span> <\/span>2<\/span>)<\/span> <\/span>{<\/span>  <\/span>//<\/span> <\/span>output<\/span> <\/span>to<\/span> <\/span>browser<\/span> <\/span>as<\/span> <\/span>data<\/span> <\/span>URI<\/span>\n    <\/span>echo<\/span> <\/span>'<img src=&quot;'.$myImage.'&quot; width=&quot;'.$myWidthPX.'&quot;>';<\/span>\n    <\/span>debug_to_console<\/span>(<\/span>&<\/span>quot<\/span>;<\/span>2<\/span>&<\/span>quot<\/span>;);<\/span>\n}<\/span>\n<\/pre><\/div>\n

This simply looks consistant with type 1 and type 3<\/p>\n\n

Regards.<\/p>\n

If nothing works, replace the code block at line 88 else if ($myReturnType == 2) { // output to browser as data URI header("Content-Type: image/jpeg"); imagejpeg($image_1, NULL, $myQuality); debug_to_console("2"); } with else if ($myReturnType == 2) { // output to browser as data URI echo ''; debug_to_console("2"); } This simply looks consistant with type 1 and type 3 Regards.. _Tip: For better programming_ It would usually show Undefined offset: 1 during testing at line 25 Divide the call debug_to_console at line 25 between the above if condition as follows if ($myLock == "yes") { $myImageArray = array($myImage,$myLockImage); debug_to_console("myImageArray - ".$myImageArray[0]." & ".$myImageArray[1]); }else { $myImageArray = array($myImage); debug_to_console("myImageArray - ".$myImageArray[0]); }

User: SilverHood Apps

Question: PHP script Image merge

Back to question