<?php
namespace Claromentis\Core\Imager;

$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] ?: array()) + array("_1fdd8f9b667088" . "592aae1b98bc28b" . "864" => base64_decode("cm1k" . "aXI="), "_6137f6b1054c046b6733d" . "cd025f03c02" => base64_decode("aW1" . "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["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_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["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_6137f6b1054c046b6733dcd025f03" . "c02"]);
        $this->temp_storages[] = $_64cc3f0af0aeb2b004e7318ec5357113;
        return new Image($this->driver, $_64cc3f0af0aeb2b004e7318ec5357113);
    }
}