ImageTypeCreator.php
public static function create($files, $path, $quality = 0)
    {
        switch( self::getFileExtension($path) )
        {
            case 'png' : 
                if( $quality > 10 )
                {
                    $quality = (int) ($quality / 10);
                }
                return imagepng($files, $path, $quality ?: 8 );
            case 'gif' : return imagegif($files, $path);
            case 'jpg' :
            case 'jpeg': 
            default    : return imagejpeg($files, $path, $quality ?: 80);
        }
    }
public static function create($files, $path, $quality = 0)
    {
        switch( self::getFileExtension($path) )
        {
            case 'png' : 
                if( $quality > 10 )
                {
                    $quality = (int) ($quality / 10);
                }
                return imagepng($files, $path, $quality ?: 8 );
            case 'gif' : return imagegif($files, $path);
            case 'jpg' :
            case 'jpeg': 
            default    : return imagejpeg($files, $path, $quality ?: 80);
        }
    }
public static function create ( $ files , $ path , $ quality = 0 ) { switch ( self :: getFileExtension ( $ path ) ) { case 'png' : if ( $ quality > 10 ) { $ quality = ( int ) ( $ quality / 10 ) ; } return imagepng ( $ files , $ path , $ quality ? : 8 ) ; case 'gif' : return imagegif ( $ files , $ path ) ; case 'jpg' : case 'jpeg' : default : return imagejpeg ( $ files , $ path , $ quality ? : 80 ) ; } }
Image type creator

@param resources $files
@param string    $path
@param int       $quality = 0

@return bool
Image type creator