Platforms to show: All Mac Windows Linux Cross-Platform

DiffPicturesMBS(source as picture, dest as picture, square as boolean) as picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Graphics & Pictures MBS Picture Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates the difference between two pictures.
Example
// our test Picture
dim p as Picture = LogoMBS(500)

// compress with JPEG and 10%
dim d as string = PictureToJPEGStringMBS(p, 10)

// decompress
dim q as Picture = JPEGStringToPictureMBS(d, true)

// compare them
window1.Backdrop = DiffPicturesMBS(p, q, true)

Source and dest pictures must have same size. If square, the error is squared, so you see it much better.

Returns nil in case not enough memory is available or pictures do not have same size or are nil.

If both pictures are equal, all pixels in the returned picture are black.
See also Picture.isBlackMBS, and Picture.CompareMBS.

Some examples using this global method:

Blog Entries

The items on this page are in the following plugins: MBS Picture Plugin.


The biggest plugin in space...