ImageExtensionsEqualsByContent Method
Compares an image to another one by content and returns whether they are equal. Images of different
size or pixel format are considered different.
Namespace: KGySoft.DrawingAssembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 8.1.0
public static bool EqualsByContent(
this Image? image1,
Image? image2
)
<ExtensionAttribute>
Public Shared Function EqualsByContent (
image1 As Image,
image2 As Image
) As Boolean
public:
[ExtensionAttribute]
static bool EqualsByContent(
Image^ image1,
Image^ image2
)
[<ExtensionAttribute>]
static member EqualsByContent :
image1 : Image *
image2 : Image -> bool
- image1 Image
- First image instance.
- image2 Image
- Second image instance.
Boolean if both images have the same content; otherwise,
.In Visual Basic and C#, you can call this method as an instance method on any object of type
Image. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
If an image is not a
Bitmap instance, a temporary
Bitmap is created for the check.
This method compares images by raw content. If the images have padding in each stride (content row), padding content is considered as well.