rotate — Rotate an image
Description
public Intervention\Image\Image rotate(float $angle, [string $bgcolor])
Rotate the current image counter-clockwise by a given angle. Optionally define a background color for the uncovered zone after the rotation.
Parameters
angle
The rotation angle in degrees to rotate the image counter-clockwise.
bgcolor (optional)
A background color for the uncovered zone after the rotation. The background color can be passed in different color formats. Default: #ffffff
, transparent if supported by the output format
Return Values
Instance of Intervention\Image\Image
Examples
// create Image from file
$img = Image::make('public/foo.jpg');
// rotate image 45 degrees clockwise
$img->rotate(-45);
See also
当前内容版权归 intervention 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 intervention .