<?php
namespace Claromentis\Core\Imager;

$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] ?: array()) + array("_6137f6b1054c04" . "6b6733dcd025f03" . "c02" => base64_decode("a" . "W" . "1" . "n"), "_1fdd8f9b667088592" . "aae1b98bc28b864" => base64_decode("cm1kaX" . "I="));
use Claromentis\Core\Util\FilesystemUtil;




class ImagerFactory
{
    protected $driver;
    protected $temp_path;
    protected $temp_storages = [];
    public function __construct(Driver\Driver $_1689db965dcd5989e8faf51389aad5c4, string $_f1dd9b97aa06d34cdac8b3c1f48750d9)
    {
        $this->driver = $_1689db965dcd5989e8faf51389aad5c4;
        $this->temp_path = $_f1dd9b97aa06d34cdac8b3c1f48750d9;
    }
    public function __destruct()
    {
        foreach ($this->temp_storages as $_64cc3f0af0aeb2b004e7318ec5357113) {
            
            
            @$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_1fdd8f9b6670" . "88592aae1b98b" . "c28b864"]($_64cc3f0af0aeb2b004e7318ec5357113);
        }
    }
    
    
    
    
    
    
    
    
    public function CreateFromFile(string $_93469c9375390f862eebb779f8b740e4) : Image
    {
        $_54faabe694dfa8d05dc6c0827a214f82 = $this->NewImage();
        $_54faabe694dfa8d05dc6c0827a214f82->SetSrcFile($_93469c9375390f862eebb779f8b740e4, false);
        return $_54faabe694dfa8d05dc6c0827a214f82;
    }
    protected function NewImage() : Image
    {
        global $g_application;
        
        
        $_3e9dd802f6570205386040c44f4fa34c = $g_application[FilesystemUtil::class];
        $_64cc3f0af0aeb2b004e7318ec5357113 = $_3e9dd802f6570205386040c44f4fa34c->CreateTempPath($this->temp_path, $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_6137f6b1054c046b6733dcd" . "025f03c02"]);
        $this->temp_storages[] = $_64cc3f0af0aeb2b004e7318ec5357113;
        return new Image($this->driver, $_64cc3f0af0aeb2b004e7318ec5357113);
    }
}