1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-27 15:50:09 +02:00

Add shortcut method Image::removeProfile()

This commit is contained in:
Oliver Vogel
2023-11-26 15:17:56 +01:00
parent d3ccbe232d
commit 64b2ca1849
3 changed files with 14 additions and 1 deletions

View File

@@ -51,6 +51,7 @@ use Intervention\Image\Modifiers\PadModifier;
use Intervention\Image\Modifiers\PixelateModifier;
use Intervention\Image\Modifiers\PlaceModifier;
use Intervention\Image\Modifiers\ProfileModifier;
use Intervention\Image\Modifiers\ProfileRemovalModifier;
use Intervention\Image\Modifiers\RemoveAnimationModifier;
use Intervention\Image\Modifiers\ResizeDownModifier;
use Intervention\Image\Modifiers\ResizeModifier;
@@ -181,6 +182,11 @@ final class Image implements ImageInterface, Countable
return $this->modify(new ProfileModifier($profile));
}
public function removeProfile(): ImageInterface
{
return $this->modify(new ProfileRemovalModifier());
}
public function sharpen(int $amount = 10): ImageInterface
{
return $this->modify(new SharpenModifier($amount));

View File

@@ -167,6 +167,13 @@ interface ImageInterface extends IteratorAggregate, Countable
*/
public function setProfile(ProfileInterface $profile): ImageInterface;
/**
* Remove ICC color profile from the current image
*
* @return ImageInterface
*/
public function removeProfile(): ImageInterface;
/**
* Sharpen the current image with given strength
*

View File

@@ -2,6 +2,6 @@
namespace Intervention\Image\Modifiers;
class ProfileModifier extends AbstractModifier
class ProfileRemovalModifier extends AbstractModifier
{
}