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 |
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.
- 5 properties
- property Count as Integer
- property Handle as Integer
- property PrimaryImageIndex as Integer New in 25.5
- property Status as Integer
- property Type as string
- 14 methods
- method AuxiliaryDataInfoAtIndex(index as integer, auxiliaryImageDataType as String) as dictionary New in 25.5
- method AuxiliaryDataInfoAtIndexCF(index as integer, auxiliaryImageDataType as String) as variant New in 25.5
- method Constructor(data as string, options as dictionary = nil)
- method Constructor(file as folderitem, options as dictionary = nil)
- method Constructor(options as dictionary = nil)
- method CreateImageAtIndex(index as Integer, options as dictionary = nil) as CGImageMBS
- method CreateThumbnailAtIndex(index as Integer, options as dictionary = nil) as CGImageMBS
- method Properties(options as dictionary = nil) as dictionary
- method PropertiesAtIndex(index as Integer, options as dictionary = nil) as dictionary
- method PropertiesAtIndexCF(index as Integer, options as Variant = nil) as Variant
- method PropertiesCF(options as Variant = nil) as Variant
- method RemoveCacheAtIndex(Index as Integer) New in 25.5
- method StatusAtIndex(index as Integer) as Integer
- method UpdateData(data as string, final as boolean)
- 8 shared methods
- shared method CreateIncremental(options as dictionary=nil) as CGImageSourceMBS
- shared method CreateThumbnailMT(data as MemoryBlock, ImageIndex as integer = 0, Options as dictionary = nil) as CGImageMBS
- shared method CreateThumbnailMT(data as String, ImageIndex as integer = 0, Options as dictionary = nil) as CGImageMBS
- shared method CreateThumbnailMT(file as FolderItem, ImageIndex as integer = 0, Options as dictionary = nil) as CGImageMBS
- shared method CreateWithData(data as string, options as dictionary=nil) as CGImageSourceMBS
- shared method CreateWithFile(file as folderitem, options as dictionary=nil) as CGImageSourceMBS
- shared method CreateWithURL(url as string, options as dictionary=nil) as CGImageSourceMBS
- shared method TypeIdentifiers as string()
- 690 constants as shared methods
- 6 constants
Constants
| 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.
Blog Entries
- MBS Xojo Plugins, version 25.5pr2
- Reading JPEG Thumbnails from EXIF
- Multithreaded plugin functions can increase speed of Xojo application
- MonkeyBread Software Releases the MBS Xojo Plugins in version 19.1
- CGImageSourceMBS CreateThumbnailMT method for Xojo
- MonkeyBread Software Releases the MBS Xojo plug-ins in version 17.0
- Tip of day: Load ICC profile on OS X for any image format with CGImageSource
- Tip of the day: Edit IPTC data in JPEG file with CGImageSource/CGImageDestination
- Tip of the day: Quickly query image size
- MBS REALbasic plug-ins version 9.5
Xojo Developer Magazine
Release notes
- Version 25.5
- Rewrote CGImageSourceMBS and CGImageDestinationMBS classes. More methods and properties and raising exceptions in case of errors.
- Version 19.1
- Added CGImageSourceMBS.CreateThumbnailMT to create thumbnails threaded.
- Version 17.0
- Added CGImageSourceMBS kCGImageSourceShouldCacheImmediately.
Some methods using this class:
- CGImageDestinationMBS.AddImageFromSource(source as CGImageSourceMBS, index as Integer, options as dictionary = nil)
- CGImageDestinationMBS.AddImageFromSourceCF(source as CGImageSourceMBS, index as Integer, options as Variant = nil)
Some examples using this class:
- /MacCG/CGImageSource/CGImageSource Convert
- /MacCG/CGImageSource/CGImageSource Properties
- /MacCG/CGImageSource/CGImageSource Thumbnails Threaded
- /MacOSX/Image Thumbnail
Some related classes:
The items on this page are in the following plugins: MBS MacCG Plugin.
CGImageMetadataTagMBS - CGLayerMBS