当裁剪我调整大小的图像时,图像的右下角有这样的空白区域。 Image
这是我的代码:
// Dimention 0 is 800, Dimention 2 Image Width i need, Dimention 3 Image Height, Dimention 4 Top And 5 Left
Image::make($file->getRealPath())
->resize($dimentions[0], null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->crop($dimentions[2], $dimentions[3], $dimentions[4], $dimentions[5])
->insert('asset/images/watermark.png', 'bottom-right', 10, 10)
->save('uploads/' . "$directory/" . $filename);