GDFilter.php
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);
        }
    }
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);
        }
    }
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 ) ; } }
Applies the used filters belonging to the GD class.

@param string $file
@param array  $filters
Applies the used filters belonging to the GD class .