public Intervention\Image\Image opacity(integer $transparency)
Set the opacity in percent of the current image ranging from 100% for opaque and 0% for full transparency.
Note: Performance intensive on larger images. Use with care.
The new percent of transparency as integer for the current image.
Instance of Intervention\Image\Image
// create Image from file and set transparency to 50%
Image::make('public/foo.jpg')->opacity(50);
// create new Intervention Image from file and set image full transparent
$img = Image::make('public/foo.jpg');
$img->opacity(0);
2023-09-08 更新 本文链接:https://upwqy.com/index.php/wiki/info/908.html