class OnPixelBased implements FilterInterface

The OnPixelBased takes a callable, and for each pixel, this callable is called with the image (\Imagine\Image\ImageInterface) and the current point (\Imagine\Image\Point).

Properties

protected callable $callback

Methods

__construct(callable $callback)

Initialize the instance.

apply(ImageInterface $image)

Applies scheduled transformation to an ImageInterface instance.

Details

at line 37
__construct(callable $callback)

Initialize the instance.

Parameters

callable $callback

Exceptions

InvalidArgumentException

at line 51
ImageInterface apply(ImageInterface $image)

Applies scheduled transformation to an ImageInterface instance.

Parameters

ImageInterface $image

Return Value

ImageInterface returns the processed ImageInterface instance

See also

FilterInterface::apply