PictureBlend: DiffPicturesMBS

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

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.


💬 Ask a question or report a problem