src/S3/Image.php
public function saveMaxWidthHeight($width, $height = 20000, $path = 'i')
    {
        $this->handle->image_resize = true;
        $this->handle->image_ratio  = true;
        $this->handle->image_x      = $width;
        $this->handle->image_y      = $height;

        $tmp_path = sys_get_temp_dir() . '/';
        $this->handle->process($tmp_path);

        $this->s3->sendFile($tmp_path . $this->handle->file_dst_name, $path, $this->_new_name);
        unlink($tmp_path . $this->handle->file_dst_name);

        return $this->_new_name;
    }
public function saveMaxWidthHeight($width, $height = 20000, $path = 'i')
    {
        $this->handle->image_resize = true;
        $this->handle->image_ratio  = true;
        $this->handle->image_x      = $width;
        $this->handle->image_y      = $height;

        $tmp_path = sys_get_temp_dir() . '/';
        $this->handle->process($tmp_path);

        $this->s3->sendFile($tmp_path . $this->handle->file_dst_name, $path, $this->_new_name);
        unlink($tmp_path . $this->handle->file_dst_name);

        return $this->_new_name;
    }
public function saveMaxWidthHeight ( $ width , $ height = 20000 , $ path = 'i' ) { $ this -> handle -> image_resize = true ; $ this -> handle -> image_ratio = true ; $ this -> handle -> image_x = $ width ; $ this -> handle -> image_y = $ height ; $ tmp_path = sys_get_temp_dir ( ) . '/' ; $ this -> handle -> process ( $ tmp_path ) ; $ this -> s3 -> sendFile ( $ tmp_path . $ this -> handle -> file_dst_name , $ path , $ this -> _new_name ) ; unlink ( $ tmp_path . $ this -> handle -> file_dst_name ) ; return $ this -> _new_name ; }
Save the current image with max width and height keeping ratio

@param int    $width  max width of the image
@param int    $height max height of the image
@param string $path   File system path to save the image to
Save the current image with max width and height keeping ratio