Platforms to show: All Mac Windows Linux Cross-Platform

CGImageSourceMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
The CoreGraphics class for image loading.
Var file as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
Var c as new CGImageSourceMBS(file)
Var img as CGImageMBS = c.CreateImageAtIndex(0)


CGImageSource objects, available in Mac OS X v10.4 or later, abstract the data-reading task. An image source can read image data from a URL, a file or a string.

After creating a CGImageSource object for the appropriate source, you can obtain images, thumbnails, image properties, and other image information using CGImageSource functions.


Constant Value Description
kCGImageStatusComplete 0 One of the status constants. The operation is complete.
kCGImageStatusIncomplete -1 One of the status constants. The operation is not complete.
kCGImageStatusInvalidData -4 One of the status constants. The data is not valid.
kCGImageStatusReadingHeader -2 One of the status constants. In the process of reading the header.
kCGImageStatusUnexpectedEOF -5 One of the status constants. The end of the file was encountered unexpectedly.
kCGImageStatusUnknownType -3 One of the status constants. The image is an unknown type.

This class has no sub classes.

Some methods using this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes

  • Version 19.1
  • Version 17.0

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

CGImageMetadataTagMBS   -   CGLayerMBS

The biggest plugin in space...