Platforms to show: All Mac Windows Linux Cross-Platform

Back to CGImageMBS class.

CGImageMBS.AlphaInfo as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the alpha channel information for a bitmap image.

A CGImageAlphaInfo constant that specifies (1) whether the bitmap contains an alpha channel, (2) where the alpha bits are located in the image data, and (3) whether the alpha value is premultiplied. For possible values, see Constants. The function returns kCGImageAlphaNone if the image parameter refers to an image mask.
(Read only property)

Some examples using this property:

CGImageMBS.BitmapInfo as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the bitmap information for a bitmap image.

This function returns a constant that specifies:

The type of bitmap data—floating point or integer. You use the constant kCGBitmapFloatComponents to extract this information.

Whether an alpha channel is in the data, and if so, how the alpha data is stored. You use the constant kCGBitmapAlphaInfoMask to extract the alpha information. Alpha information is specified as one of the constants listed in Alpha Information for Images.
(Read only property)

CGImageMBS.BitsPerComponent as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 3.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the number of bits/component of the image.

(Read only property)

CGImageMBS.BitsPerPixel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 3.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the number of bits/pixel of image.

(Read only property)

CGImageMBS.BytesPerRow as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 8.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the number of bytes allocated for a double row of a bitmap image.

(Read only property)

CGImageMBS.ColorSpace as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 3.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The color space used for the image.
Example
// get a picture file
dim file as FolderItem = SpecialFolder.Desktop.Child("sylwia.jpg")
// get image source
dim source as new CGImageSourceMBS(file)
// read image
dim image as CGImageMBS = source.CreateImageAtIndex(0)
// get Color space from image
dim profile as CGColorSpaceMBS = image.ColorSpace
// get ICC profile data
dim ICCProfile as string = profile.ICCProfile
// and parse it with LCMS and show name
dim LCMSProfile as LCMS2ProfileMBS = LCMS2ProfileMBS.OpenProfileFromString(ICCProfile)
MsgBox LCMSProfile.Name

Value is a CGColorSpaceMBS.
Returns nil on any error.
(Read only property)

CGImageMBS.handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The handle for this image.

Handle is a CGImageRef.
(Read and Write property)

CGImageMBS.height as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the image's height.

Returns 0 on error.
(Read only property)

CGImageMBS.ImageIsMask as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 3.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns true if the image is an image mask, false otherwise.

(Read only property)

CGImageMBS.RenderingIntent as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 3.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the rendering intent of the image.

Constants:
kCGRenderingIntentDefault0
kCGRenderingIntentAbsoluteColorimetric1
kCGRenderingIntentRelativeColorimetric2
kCGRenderingIntentPerceptual3
kCGRenderingIntentSaturation4
(Read only property)

CGImageMBS.RetainCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the retain count of the CGImageRef.

This is useful for debugging.
The retain count is for the CGImageRef, not the CGImageMBS object.
(Read only property)

CGImageMBS.ShouldInterpolate as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 3.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the interpolation parameter of image.

True if the image should use interpolation.
(Read only property)

CGImageMBS.width as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the image's width.

Returns 0 on error.
(Read only property)

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


The biggest plugin in space...