mirror of
https://github.com/Intervention/image.git
synced 2025-01-17 20:28:21 +01:00
Rename method
- ImageInterface::withoutProfile to ImageInterface::removeProfile
This commit is contained in:
parent
65d2b68240
commit
f08eee2bc4
@ -136,9 +136,9 @@ class Image extends AbstractImage implements ImageInterface, IteratorAggregate
|
||||
/**
|
||||
* {@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.');
|
||||
}
|
||||
|
@ -196,9 +196,9 @@ class Image extends AbstractImage implements ImageInterface, Iterator
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see ImageInterface::withoutProfile()
|
||||
* @see ImageInterface::removeProfile()
|
||||
*/
|
||||
public function withoutProfile(): ImageInterface
|
||||
public function removeProfile(): ImageInterface
|
||||
{
|
||||
return $this->modify(new ProfileRemovalModifier());
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ interface ImageInterface extends Traversable, Countable
|
||||
*
|
||||
* @return ImageInterface
|
||||
*/
|
||||
public function withoutProfile(): ImageInterface;
|
||||
public function removeProfile(): ImageInterface;
|
||||
|
||||
/**
|
||||
* Draw text on image
|
||||
|
@ -145,12 +145,12 @@ class ImageTest extends TestCase
|
||||
$this->assertInstanceOf(Image::class, $result);
|
||||
}
|
||||
|
||||
public function testWithoutProfile(): void
|
||||
public function testRemoveProfile(): void
|
||||
{
|
||||
$imagick = new Imagick();
|
||||
$imagick->readImageBlob($this->getTestImageData('test.jpg'));
|
||||
$image = new Image($imagick);
|
||||
$result = $image->withoutProfile();
|
||||
$result = $image->removeProfile();
|
||||
$this->assertInstanceOf(Image::class, $result);
|
||||
$this->expectException(ColorException::class);
|
||||
$image->profile();
|
||||
|
Loading…
x
Reference in New Issue
Block a user