mirror of
https://github.com/Intervention/image.git
synced 2025-08-26 23:35:12 +02:00
Add image method
This commit is contained in:
@@ -28,6 +28,7 @@ use Intervention\Image\Interfaces\ResolutionInterface;
|
||||
use Intervention\Image\Interfaces\SizeInterface;
|
||||
use Intervention\Image\Modifiers\GreyscaleModifier;
|
||||
use Intervention\Image\Modifiers\PixelateModifier;
|
||||
use Intervention\Image\Modifiers\RotateModifier;
|
||||
use Intervention\Image\Modifiers\SharpenModifier;
|
||||
use Intervention\Image\Modifiers\TextModifier;
|
||||
use Intervention\Image\Typography\FontFactory;
|
||||
@@ -146,6 +147,11 @@ class Image implements ImageInterface, Countable
|
||||
return $this->modify(new GreyscaleModifier());
|
||||
}
|
||||
|
||||
public function rotate(float $angle, mixed $background = 'ffffff'): ImageInterface
|
||||
{
|
||||
return $this->modify(new RotateModifier($angle, $background));
|
||||
}
|
||||
|
||||
public function text(string $text, int $x, int $y, callable|FontInterface $font): ImageInterface
|
||||
{
|
||||
return $this->modify(
|
||||
|
@@ -27,5 +27,6 @@ interface ImageInterface extends IteratorAggregate, Countable
|
||||
public function sharpen(int $amount = 10): ImageInterface;
|
||||
public function greyscale(): ImageInterface;
|
||||
public function pixelate(int $size): ImageInterface;
|
||||
public function rotate(float $angle, mixed $background = 'ffffff'): ImageInterface;
|
||||
public function text(string $text, int $x, int $y, callable|FontInterface $font): ImageInterface;
|
||||
}
|
||||
|
Reference in New Issue
Block a user