Image::rotate
Rotate the current image
2.9M Downloads / Month
Open Source MIT License
2.9M Downloads / Month
Open Source MIT License
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.
The rotation angle in degrees to rotate the image counter-clockwise.
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
Instance of Intervention\Image\Image
// create Image from file
$img = Image::make('public/foo.jpg');
// rotate image 45 degrees clockwise
$img->rotate(-45);