Platforms to show: All Mac Windows Linux Cross-Platform
Back to CGImageDestinationMBS class.
CGImageDestinationMBS.AddImage(image as CGImageMBS, properties as dictionary=nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 9.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
image: The image to add.
properties: An optional dictionary that specifies the properties of the added image.
For properties you can use those in the CGImageSourceMBS class, kCGImageDestinationLossyCompressionQuality and kCGImageDestinationBackgroundColor.
The function logs an error if you add more images than what you specified when you created the image destination.
Available in Mac OS X version 10.4 and later.
CGImageDestinationMBS.AddImageCF(image as CGImageMBS, properties as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 13.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
image: The image to add.
properties: An optional dictionary or CFDictionaryMBS that specifies the properties of the added image.
For properties you can use those in the CGImageSourceMBS class, kCGImageDestinationLossyCompressionQuality and kCGImageDestinationBackgroundColor.
The function logs an error if you add more images than what you specified when you created the image destination.
Available in Mac OS X version 10.4 and later.
CGImageDestinationMBS.AddImageFromSource(source as CGImageSourceMBS, index as Integer, options as dictionary = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 9.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
source: An image source.
index: An index that specifies the location of the image in the image source. The index is zero-based.
properties: A dictionary that specifies properties to overwrite or add to the source image properties.
Available in Mac OS X version 10.4 and later.
Some examples using this method:
CGImageDestinationMBS.AddImageFromSourceCF(source as CGImageSourceMBS, index as Integer, options as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 13.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
source: An image source.
index: An index that specifies the location of the image in the image source. The index is zero-based.
properties: A dictionary or CFDcitionaryMBS that specifies properties to overwrite or add to the source image properties.
Available in Mac OS X version 10.4 and later.
CGImageDestinationMBS.Constructor(file as folderitem, type as string, count as Integer = 1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 9.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
file: The file to write to. If the file already exists, the data at this location is overwritten.
type: The UTI (uniform type identifier) of the resulting image file. See Uniform Type Identifiers Overview for a list of system-declared and third-party UTIs.
count: The number of images (not including thumbnail images) that the image file will contain.
On success the handle value is not zero.
Available in Mac OS X version 10.4 and later.
See also:
CGImageDestinationMBS.Constructor(type as string, count as Integer = 1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 9.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
type: The uniform type identifier (UTI) of the resulting image file. See Uniform Type Identifiers Overview for a list of system-declared and third-party UTIs.
count: The number of images (not including thumbnail images) that the image file will contain.
On success the handle is not zero.
Available in Mac OS X version 10.4 and later.
See also:
CGImageDestinationMBS.Constructor(url as string, type as string, count as Integer = 1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 9.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
url: The URL to write to. If the URL already exists, the data at this location is overwritten.
type: The UTI (uniform type identifier) of the resulting image file. See Uniform Type Identifiers Overview for a list of system-declared and third-party UTIs.
count: The number of images (not including thumbnail images) that the image file will contain.
On success the handle value is not zero.
Available in Mac OS X version 10.4 and later.
See also:
CGImageDestinationMBS.Data as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 9.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The data is collected and after you called Finalize you can pick the data here.
CGImageDestinationMBS.Finalize as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 9.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns true if the image is successfully written; false otherwise.
You must call this function or the output of the image destination will not be valid. After calling this function, no additional data can be added to the image destination.
Available in Mac OS X version 10.4 and later.
CGImageDestinationMBS.FinalizeMT as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns true if the image is successfully written; false otherwise.
You must call this function or the output of the image destination will not be valid. After calling this function, no additional data can be added to the image destination.
Available in Mac OS X version 10.4 and later.
The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.
CGImageDestinationMBS.SetProperties(options as dictionary = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 9.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Available in Mac OS X version 10.4 and later.
CGImageDestinationMBS.SetPropertiesCF(options as Variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreGraphics | MBS MacCG Plugin | 13.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Available in Mac OS X version 10.4 and later.
Options can be a Dictionary or CFDictionaryMBS.
The items on this page are in the following plugins: MBS MacCG Plugin.
