( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/tmpr/../tmpr/../tmpr/../editorZ/processCanvas.php
<?php
include("../includes/limittext.php");
include('../Connections/videoondemand.php');
require("../DbSql2.inc.php");
require("../NewsSql2.inc.php");
require("../includes/processFunctionsX.php");

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);


$db = new NewsSQL;

include("../protect.php");


$themeid = 3890;

$resultX =  getEachJSONLayer($themeid,1);

$json = $resultX["layers2"];





$url =  $json;
$url =  str_replace("http://localhost/thebrand/","https://www.thebrand.ai/",$url) ;
$urlArray = str_replace("'","",$url);
$Description = json_decode($urlArray , true);
$brandLayers = $Description['canvas']['objects'];
$brandWidth = $Description['canvasWidth'];
$brandHeight = $Description['canvasHeight'];











function searchForId($id, $array) {
    foreach ($array as $key => $val) {
        if ($val['family'] === $id) {
            return $key;
        }
    }
    return null;
}



$backgroundColor = 'ffffff'; // optionnal, can be null to transparent



$decodedText = html_entity_decode($fonts);
$myArray = json_decode($decodedText, true);

$imageCount =0;
foreach ($brandLayers as $value) {
    $imageCount++;
    $type = $value['type'];



    if($type=="i-text") {



        $fontFamily = $value['fontFamily'];

        $fonta = checkFontNew($fontFamily);

        if(empty($fonta)) {

            $fonta = "../assets/fonts/BebasNeue.ttf";

        }
        else
        {
            $fonta = "../assets/fonts/$fonta";

            if (file_exists($fonta)) {



            }
            else
            {
                $fonta = "../assets/fonts/BebasNeue.ttf";

            }

        }





    }


}

//$newLayer= ImageWorkshop::initFromPath("https://www.thebrand.ai/superLayer/pullFont.php");
//$newLayer->rotate($angle);
//$newLayer->resizeInPixel(700, "", true);
//$norwayLayer->addLayer( $imageCount, $newLayer,10,10);






$image = $norwayLayer->getResult();


/*// Saving the result
$dirPath = __DIR__."/done";
$filename = "pingu_edited.png";
$createFolders = true;
$backgroundColor = null; // transparent, only for PNG (otherwise it will be white if set null)
$imageQuality = 95; // useless for GIF, usefull for PNG and JPEG (0 to 100%)

$norwayLayer->save($dirPath, $filename, $createFolders, $backgroundColor, $imageQuality);*/



if(!empty($_GET['snap']))
{

    $filename = $_GET['poster'];
// Saving the result
    $dirPath = "../v/uploads/gallery/";

    $createFolders = true;
    $backgroundColor = null; // transparent, only for PNG (otherwise it will be white if set null)
    $imageQuality = 95; // useless for GIF, usefull for PNG and JPEG (0 to 100%)

    $norwayLayer->save($dirPath, $filename, $createFolders, $backgroundColor, $imageQuality);

}




header('Content-type: image/png');
imagejpeg($image, null, 95); // We chose to show a JPG with a quality of 95%
exit;



?>