<?php
namespace Claromentis\Core\Imager;

$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"] ?: array()) + array("_1fdd8f9b667088592aae1b98bc28b" . "864" => base64_decode("cm1kaX" . "I="), "_6137f6b1054c046b6733" . "dcd025f03c02" => base64_decode("a" . "W" . "1" . "n"));
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["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_1fdd8f9b66708" . "8592aae1b98bc2" . "8b864"]($_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["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_6137f6b1054c046b6733dc" . "d025f03c02"]);
        $this->temp_storages[] = $_64cc3f0af0aeb2b004e7318ec5357113;
        return new Image($this->driver, $_64cc3f0af0aeb2b004e7318ec5357113);
    }
}