mirror of
https://github.com/Intervention/image.git
synced 2025-08-05 05:17:26 +02:00
Rename method
- ImageInterface::withoutProfile to ImageInterface::removeProfile
This commit is contained in:
@@ -136,9 +136,9 @@ class Image extends AbstractImage implements ImageInterface, IteratorAggregate
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see ImageInterface::withoutProfile()
|
* @see ImageInterface::removeProfile()
|
||||||
*/
|
*/
|
||||||
public function withoutProfile(): ImageInterface
|
public function removeProfile(): ImageInterface
|
||||||
{
|
{
|
||||||
throw new NotSupportedException('Color profiles are not supported by GD driver.');
|
throw new NotSupportedException('Color profiles are not supported by GD driver.');
|
||||||
}
|
}
|
||||||
|
@@ -196,9 +196,9 @@ class Image extends AbstractImage implements ImageInterface, Iterator
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see ImageInterface::withoutProfile()
|
* @see ImageInterface::removeProfile()
|
||||||
*/
|
*/
|
||||||
public function withoutProfile(): ImageInterface
|
public function removeProfile(): ImageInterface
|
||||||
{
|
{
|
||||||
return $this->modify(new ProfileRemovalModifier());
|
return $this->modify(new ProfileRemovalModifier());
|
||||||
}
|
}
|
||||||
|
@@ -191,7 +191,7 @@ interface ImageInterface extends Traversable, Countable
|
|||||||
*
|
*
|
||||||
* @return ImageInterface
|
* @return ImageInterface
|
||||||
*/
|
*/
|
||||||
public function withoutProfile(): ImageInterface;
|
public function removeProfile(): ImageInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draw text on image
|
* Draw text on image
|
||||||
|
@@ -145,12 +145,12 @@ class ImageTest extends TestCase
|
|||||||
$this->assertInstanceOf(Image::class, $result);
|
$this->assertInstanceOf(Image::class, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithoutProfile(): void
|
public function testRemoveProfile(): void
|
||||||
{
|
{
|
||||||
$imagick = new Imagick();
|
$imagick = new Imagick();
|
||||||
$imagick->readImageBlob($this->getTestImageData('test.jpg'));
|
$imagick->readImageBlob($this->getTestImageData('test.jpg'));
|
||||||
$image = new Image($imagick);
|
$image = new Image($imagick);
|
||||||
$result = $image->withoutProfile();
|
$result = $image->removeProfile();
|
||||||
$this->assertInstanceOf(Image::class, $result);
|
$this->assertInstanceOf(Image::class, $result);
|
||||||
$this->expectException(ColorException::class);
|
$this->expectException(ColorException::class);
|
||||||
$image->profile();
|
$image->profile();
|
||||||
|
Reference in New Issue
Block a user