BlackWhite
class BlackWhite extends OnPixelBased implements FilterInterface
This filter calculates, for each pixel of an image, whether it is ligher or darker than a threshold.
If the pixel is lighter than the thresold it will be black, otherwise it will be light. The result is an image with only black and white pixels (black pixels for ligher colors, white pixels for darker colors).
Properties
protected callable | $callback | from OnPixelBased | |
protected Grayscale | $grayScaleFilter |
Methods
__construct(int $threshold)
Initialize this filter.
Details
at line 40
__construct(int $threshold)
Initialize this filter.
at line 62
ImageInterface
apply(ImageInterface $image)
Applies scheduled transformation to an ImageInterface instance.