public static function apply($file, $filters)
    {
        if( ! empty($filters) )
        { 
            $gd = self::getSingletonGDClass();

            $gd->canvas($file);
            
            foreach( $filters as $filter )
            {
                $method     = $filter[0];
                $parameters = $filter[1] ?? [];

                $gd->$method(...(array) $parameters);
            }
    
            $gd->generate(MimeTypeFinder::get($file), $file);
        }
    }