mirror of
https://github.com/Intervention/image.git
synced 2025-08-01 11:30:16 +02:00
Change signatures of ImageInterface
This commit is contained in:
@@ -6,6 +6,7 @@ use Intervention\Image\Collection;
|
||||
use Intervention\Image\EncodedImage;
|
||||
use Intervention\Image\Geometry\Point;
|
||||
use Intervention\Image\Geometry\Size;
|
||||
use Intervention\Image\Interfaces\CollectionInterface;
|
||||
use Intervention\Image\Interfaces\EncoderInterface;
|
||||
use Intervention\Image\Interfaces\FrameInterface;
|
||||
use Intervention\Image\Interfaces\ImageInterface;
|
||||
@@ -24,12 +25,12 @@ abstract class AbstractImage implements ImageInterface
|
||||
//
|
||||
}
|
||||
|
||||
public function getIterator(): Collection
|
||||
public function getIterator(): CollectionInterface
|
||||
{
|
||||
return $this->frames;
|
||||
}
|
||||
|
||||
public function getFrames(): Collection
|
||||
public function getFrames(): CollectionInterface
|
||||
{
|
||||
return $this->frames;
|
||||
}
|
||||
@@ -225,7 +226,7 @@ abstract class AbstractImage implements ImageInterface
|
||||
);
|
||||
}
|
||||
|
||||
public function pickColors(int $x, int $y): Collection
|
||||
public function pickColors(int $x, int $y): CollectionInterface
|
||||
{
|
||||
$colors = new Collection();
|
||||
foreach ($this->getFrames() as $key => $frame) {
|
||||
|
@@ -2,13 +2,12 @@
|
||||
|
||||
namespace Intervention\Image\Interfaces;
|
||||
|
||||
use Intervention\Image\Collection;
|
||||
use Intervention\Image\EncodedImage;
|
||||
|
||||
interface ImageInterface
|
||||
{
|
||||
public function getIterator(): Collection;
|
||||
public function getFrames(): Collection;
|
||||
public function getIterator(): CollectionInterface;
|
||||
public function getFrames(): CollectionInterface;
|
||||
public function getFrame(int $key = 0): ?FrameInterface;
|
||||
public function addFrame(FrameInterface $frame): ImageInterface;
|
||||
public function setLoops(int $count): ImageInterface;
|
||||
@@ -21,7 +20,7 @@ interface ImageInterface
|
||||
public function toWebp(int $quality = 75): EncodedImage;
|
||||
public function toGif(): EncodedImage;
|
||||
public function toPng(): EncodedImage;
|
||||
public function pickColors(int $x, int $y): Collection;
|
||||
public function pickColors(int $x, int $y): CollectionInterface;
|
||||
public function pickColor(int $x, int $y, int $frame_key = 0): ?ColorInterface;
|
||||
public function greyscale(): ImageInterface;
|
||||
public function blur(int $amount = 5): ImageInterface;
|
||||
|
Reference in New Issue
Block a user