Skip to content

Commit

Permalink
增加图片resize参数,可以通过该参数设置resize的压缩质量比
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyecommerce committed Nov 18, 2018
1 parent b5dbe22 commit fda0e38
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions helpers/CImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CImage
* @return
*/

public static function saveResizeMiddleWaterImg($imgPath,$newPath,$resize,$waterMark=''){
public static function saveResizeMiddleWaterImg($imgPath, $newPath, $resize, $waterMark='', $options = []){
//exit;
$image = static::getImagine()->open($imgPath);
$sourceBox = $image->getSize();
Expand Down Expand Up @@ -137,7 +137,8 @@ public static function saveResizeMiddleWaterImg($imgPath,$newPath,$resize,$water
$gr_image->paste($waterImage, new Point($start[0], $start[1]));
}
}
$gr_image->save($newPath);
;
$gr_image->save($newPath, $options);
}


Expand Down

0 comments on commit fda0e38

Please sign in to comment.