ImagesDifference
Overview
ImagesDifference is a class in Aspose.PDF FOSS for .NET.
Inherits from: IDisposable.
Result of a graphical comparison of two rendered PDF pages: the first (source) page rasterised to a 24bpp bitmap, plus a per-pixel record of where the second (destination) page differs from it.
This class provides 3 methods for working with ImagesDifference objects in .NET programs.
Available methods include: DifferenceToImage, Dispose, GetDestinationImage.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: Difference, Height, SourceImage, Stride.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
SourceImage | Bitmap | Read | The first (source) page rendered to a 24bpp RGB bitmap. |
Difference | int[] | Read | Per-pixel difference record, row-major (index = y * Width + x). |
Stride | int | Read | Row stride (in bytes) of SourceImage at 24bpp. |
Height | int | Read | Pixel height of the compared images. |
Methods
| Signature | Description |
|---|---|
GetDestinationImage() | Reconstruct the second (destination) page image: identical pixels are copied from the source, differing pixels take their recorded destination colour. |
DifferenceToImage(color: Color, backgroundColor: Color) | Produce a difference mask: color where the two pages differ and backgroundColor where they are identical. |
Dispose() | Calls Dispose on this ImagesDifference instance. |