Novis\Image\Comparison
The result of Image::compare. A delta is the largest difference in one channel, from 0 to 255. ssim is 1.0 for identical images. differenceImage is a PNG with the differing pixels in red, or null.
Returned by
You get a Novis\Image\Comparison from these methods:
Members
1 member.
| Member | Signature |
|---|---|
constructor | constructor(bool $identical, uint $differingPixels, uint $maxDelta, float $ssim, ?bytes $differenceImage): void |
Properties
$comparison->identicalbooltruewhen every pixel of the two images is the same$comparison->differingPixelsuintthe number of pixels with a delta abovetolerance$comparison->maxDeltauintthe largest difference in one channel, from 0 to 255$comparison->ssimfloatthe structural similarity of the two images,1.0for identical images$comparison->differenceImage?bytesa PNG image with the differing pixels in red, ornull.Image::comparedraws it only with the optionrender: true.
