Picture: MergePictureMBS

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

Back to Picture class.

MergePictureMBS(source1 as picture, source2 as picture) as picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Graphics & Pictures MBS Picture Plugin 7.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Merges the two pictures into one.
Example
// in RB this method would work like this:

dim i,j as Integer
dim col2 as color
dim r1,r2,g1,g2,b1,b2 as Integer
dim dest as Picture // destination
dim source1, source2 as Picture // source pictures

col2 = source1.graphics.pixel(i,j)
r1 = col2.red
g1 = col2.green
b1 = col2.blue
col2 = source2.graphics.pixel(i,j)
r2 = col2.red
g2 = col2.green
b2 = col2.blue

dest.graphics.pixel(i,j) = RGB(max(r1,r2), max(g1,g2), max(b1,b2))

Masks are ignored.
Returns nil on low memory.
Both pictures must have the same size and not be nil.

Some examples using this global method:

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


💬 Ask a question or report a problem