Platforms to show: All Mac Windows Linux Cross-Platform
Back to CGBitmapContextMBS class.
CGBitmapContextMBS.CGImage(shouldInterpolate as boolean = false, intent as Integer = 0) as CGImageMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
You will crash your application if you use this Image after the CGBitmapContext object was destroyed.
Changes made to the connected CGBitmapContext will be seen in the CGImage.
Returns nil on low memory.
Constants for intent:
kCGRenderingIntentDefault | 0 |
kCGRenderingIntentAbsoluteColorimetric | 1 |
kCGRenderingIntentRelativeColorimetric | 2 |
kCGRenderingIntentPerceptual | 3 |
kCGRenderingIntentSaturation | 4 |
Set shouldInterpolate to true if the image should use interpolation.
CGBitmapContextMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CGBitmapContextMBS.CreateImage as CGImageMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
If context is not a bitmap context, or if the image cannot be created for any reason, this function returns NULL. This is a "copy" operation subsequent changes to context will not affect the contents of the returned image.
Note that in some cases the copy will actually follow "copy-on-write" semantics, so that the actual physical copy of the bits will only occur if the underlying data in the bitmap context is modified. As a consequence, you may wish to use the resulting image and release it before performing more drawing into the bitmap context; in this way, the actual physical copy of the data may be avoided.
The items on this page are in the following plugins: MBS MacCG Plugin.