src/Painter.php
/**
     * Save the current image with fixed height
     *
     * @param int    $height the height of the new image
     * @param string $dir    File system path to save the image to
     */
Save the current image with fixed height
@param int    $height the height of the new image
@param string $dir    File system path to save the image to
Save the current image with fixed height @param int $height the height of the new image @param string $dir File system path to save the image to
public function saveFixedHeight(int $height, string $dir = 'i') : Image
    {
        $this->uploadHandler->image_resize  = true;
        $this->uploadHandler->image_ratio_x = true;
        $this->uploadHandler->image_y       = $height;
        $tmp_path = sys_get_temp_dir() . '/';
        $this->uploadHandler->process($tmp_path);
        $image = $this->persistenceHandler->persistFile(
            $tmp_path . $this->uploadHandler->file_dst_name,
            $dir,
            $this->uploadHandler->file_dst_name
        );
        unlink($tmp_path . $this->uploadHandler->file_dst_name);
        return $image;
    }
public function saveFixedHeight ( int $ height , string $ dir = 'i' ) : Image { $ this -> uploadHandler -> image_resize = true ; $ this -> uploadHandler -> image_ratio_x = true ; $ this -> uploadHandler -> image_y = $ height ; $ tmp_path = sys_get_temp_dir ( ) . '/' ; $ this -> uploadHandler -> process ( $ tmp_path ) ; $ image = $ this -> persistenceHandler -> persistFile ( $ tmp_path . $ this -> uploadHandler -> file_dst_name , $ dir , $ this -> uploadHandler -> file_dst_name ) ; unlink ( $ tmp_path . $ this -> uploadHandler -> file_dst_name ) ; return $ image ; }
Save the current image with fixed height
 @param int    $height the height of the new image
 @param string $dir    File system path to save the image to
Save the current image with fixed height @param int $height the height of the new image @param string $dir File system path to save the image to