Platforms to show: All Mac Windows Linux Cross-Platform

CGImageMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
A class for a core graphics image.

If the release property is true, the destructor of this class will release the image reference.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Bitmap Info

Constant Value Description
kCGBitmapAlphaInfoMask &h1F The alpha information mask. Use this to extract alpha information that specifies whether a bitmap contains an alpha channel and how the alpha channel is generated.
kCGBitmapByteOrder16Big 12288 16-bit, big endian format.
kCGBitmapByteOrder16Little 4096 16-bit, little endian format.
kCGBitmapByteOrder32Big 16384 32-bit, big endian format.
kCGBitmapByteOrder32Little 8192 32-bit, little endian format.
kCGBitmapByteOrderDefault 0 The default byte order.
kCGBitmapByteOrderMask &h7000 The byte ordering of pixel formats.
kCGBitmapFloatComponents 256 The components of a bitmap are floating-point values.

Alpha Info

Constant Value Description
kCGImageAlphaFirst 4 The alpha component is stored in the most significant bits of each pixel. For example, non-premultiplied ARGB.
kCGImageAlphaLast 3 The alpha component is stored in the least significant bits of each pixel. For example, non-premultiplied RGBA.
kCGImageAlphaNone 0 There is no alpha channel. If the total size of the pixel is greater than the space required for the number of color components in the color space, the least significant bits are ignored. This value is equivalent to kCGImageAlphaNoneSkipLast.
kCGImageAlphaNoneSkipFirst 6 There is no alpha channel. If the total size of the pixel is greater than the space required for the number of color components in the color space, the most significant bits are ignored.
kCGImageAlphaNoneSkipLast 5 There is no alpha channel. If the total size of the pixel is greater than the space required for the number of color components in the color space, the least significant bits are ignored. This value is equivalent to kCGImageAlphaNone.
kCGImageAlphaOnly 7 There is no color data, only an alpha channel.
kCGImageAlphaPremultipliedFirst 2 The alpha component is stored in the most significant bits of each pixel and the color components have already been multiplied by this alpha value. For example, premultiplied ARGB.
kCGImageAlphaPremultipliedLast 1 The alpha component is stored in the least significant bits of each pixel and the color components have already been multiplied by this alpha value. For example, premultiplied RGBA.

This class has no sub classes.

Some useful global functions for this class:

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes


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


CGImageDestinationMBS   -   CGImageMetadataMBS


The biggest plugin in space...