Platforms to show: All Mac Windows Linux Cross-Platform

Back to PictureMBS class.

PictureMBS.BlendPicturesWithMaskWithBackground(SourceImage as PictureMBS, DestImage as PictureMBS, Mask as PictureMBS, Result as PictureMBS, BackgroundColour as Color) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Large Picture MBS Images Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Blend picture with mask and background.

Works for gray and RGB pictures, not for CMYK.
Returns true on success and false on failure.
Blends source and dest image into result image.
If mask is nil, we just copy pictures.
If mask is not nil, we blend using either DestImage (if non nil) or background color.
Alpha channels are not used.

See also:

PictureMBS.BlendPicturesWithMaskWithBackground(SourceImage as PictureMBS, DestImage as PictureMBS, Mask as PictureMBS, Result as PictureMBS, BackgroundColour as Color, X As Integer, Y As Integer, Width As Integer, Height As Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Large Picture MBS Images Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Blend picture with mask and background.

Works for gray and RGB pictures, not for CMYK.
Returns true on success and false on failure.
Blends source and dest image into result image.
If mask is nil, we just copy pictures.
If mask is not nil, we blend using either DestImage (if non nil) or background color.
Alpha channels are not used.

See also:

PictureMBS.CalculateMemory(width as Integer, height as Integer, theImageFormat as Integer) as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Large Picture MBS Images Plugin 10.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates the memory needed for allocating the image.
Example
dim n as int64 = PictureMBS.CalculateMemory(1000, 1000, PictureMBS.ImageFormatRGB)
MsgBox str(n)

Returns number of bytes needed.

PictureMBS.CanAllocateImage(width as Integer, height as Integer, theImageFormat as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Large Picture MBS Images Plugin 10.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Can the image with this size be allocated?
Example
dim n as Boolean = PictureMBS.CanAllocateImage(1000, 1000, PictureMBS.ImageFormatRGB)
MsgBox str(n)
dim x as Boolean = PictureMBS.CanAllocateImage(100000, 100000, PictureMBS.ImageFormatRGB)
MsgBox str(x)

Retruns true if possible and false if the size is too big.
To figure out if allocation will work, we simply allocate and release memory and see if that worked.

PictureMBS.CreatePictureMBS(width as Integer, height as Integer, theImageFormat as Integer) as PictureMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Large Picture MBS Images Plugin 9.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new PictureMBS object.

Returns nil if no factory can create a valid picture.

First the global factory object is asked to create the picture.
Second the normal PictureMBS constructor is used.

See also:

Some examples using this method:

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


The biggest plugin in space...