Platforms to show: All Mac Windows Linux Cross-Platform
Back to CGImageMBS class.
CGImageMBS.AsNSImageMBS as variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 24.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns nil on error.
Result declared as Variant to avoid plugin dependencies.
CGImageMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 13.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
See also:
CGImageMBS.Copy(r as CGRectMBS) as CGImageMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
See also:
CGImageMBS.CopyWithColorSpace(profile as CGColorSpaceMBS) as CGImageMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 3.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
profile must be a CGColorSpaceMBS.
Requires Mac OS X 10.3.
CGImageMBS.CopyWithMask(mask as CGImageMBS) as CGImageMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Parameters:
self: The image to apply the mask parameter to. This image must not be an image mask and may not have an image mask or masking color associated with it.
mask: A mask. If the mask is an image, it must be in the DeviceGray color space, must not have an alpha component, and may not itself be masked by an image mask or a masking color. If the mask is not the same size as the image specified by the image parameter, then Quartz scales the mask to fit the image.
Return Value: An image created by masking image with mask. You are responsible for releasing this object by calling CGImageRelease.
The resulting image depends on whether the mask parameter is an image mask or an image. If the mask parameter is an image mask, then the source samples of the image mask act as an inverse alpha value. That is, if the value of a source sample in the image mask is S, then the corresponding region in image is blended with the destination using an alpha value of (1-S). For example, if S is 1, then the region is not painted, while if S is 0, the region is fully painted.
If the mask parameter is an image, then it serves as an alpha mask for blending the image onto the destination. The source samples of mask' act as an alpha value. If the value of the source sample in mask is S, then the corresponding region in image is blended with the destination with an alpha of S. For example, if S is 0, then the region is not painted, while if S is 1, the region is fully painted.
CGImageMBS.DataProvider as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Value is a CGDataProviderMBS object.
Returns nil on any error.
CGImageMBS.DecodeArray as memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A memoryblock with an array of double variables.
Returns nil on any error.
CGImageMBS.JPEGData(Compression as Integer = 90) as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Compression defines the compression level from 0 to 100.
Returns nil on any error.
CGImageMBS.Picture(ColorSpace as CGColorSpaceMBS = nil) as Picture
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Colorspace: the optional CoreGraphcis Colorspace to use for the bitmap conversion (CGColorSpaceMBS class).
Returns nil on any error.
CGImageMBS.PictureScaled(OutputWidth as Integer, OutputHeight as Integer, ColorSpace as CGColorSpaceMBS = nil) as Picture
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Colorspace: the optional CoreGraphcis Colorspace to use for the bitmap conversion (CGColorSpaceMBS class).
Returns nil on any error.
If output width and height are zero, we use the image sizes.
CGImageMBS.PNGData as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns nil on any error.
Some examples using this method:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Each retain must have a release. Too many releases and your app will crash, too many retains and it will leak memory.
Use only if you really know what you are doing.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Each retain must have a release. Too many releases and your app will crash, too many retains and it will leak memory.
Use only if you really know what you are doing.
The items on this page are in the following plugins: MBS MacCG Plugin.
