CGImageDestinationMBS class
Online Documentation - Statistics - FAQ - Plugin Parts (All , Dependencies ) - Class hierarchy
New in Version
22.2
22.3
22.4
22.5
23.0
23.1
23.2
23.3
23.4
23.5
24.0
24.1
The list of the topics ,
classes ,
interfaces ,
controls ,
modules ,
global methods by category ,
global methods by name ,
screenshots ,
licenses
and examples .
Platforms to show: All Mac Windows Linux Cross-Platform
CGImageDestinationMBS class
A class to write CGImages.
Example
dim logo as Picture = LogoMBS (500 )dim image as CGImageMBS = CGCreateImageMBS (logo)dim dic as new Dictionary// 10% 'dic.Value(CGImageDestinationMBS.kCGImageDestinationLossyCompressionQuality)=0.1 // 100% dic.Value(CGImageDestinationMBS.kCGImageDestinationLossyCompressionQuality)=1.0dim file as FolderItem = SpecialFolder.Desktop.Child("logo.jpg" )dim d as new CGImageDestinationMBS(file, "public.jpeg" , 1 ) d.AddImage(image, dic)if d.Finalize then MsgBox "Saved" else MsgBox "Failed to save." end if
CGImageDestination objects, available in Mac OS X v10.4 or later, abstract the data-writing task. An image destination can represent a single image or multiple images. It can contain thumbnail images as well as properties for each image.
The functions described in this reference can write data to three kinds of destinations: a file, an URL and a string. After creating a CGImageDestination object for the appropriate destination, you can add image data and set image properties. When you are finished adding data, call the function Finalize to write the image data and properties.
property Handle as Integer
12 methods
method AddImage (image as CGImageMBS , properties as dictionary=nil)
method AddImageCF (image as CGImageMBS , properties as Variant = nil)
method AddImageFromSource (source as CGImageSourceMBS , index as Integer, options as dictionary = nil)
method AddImageFromSourceCF (source as CGImageSourceMBS , index as Integer, options as Variant = nil)
method Constructor (file as folderitem, type as string, count as Integer = 1)
method Constructor (type as string, count as Integer = 1)
method Constructor (url as string, type as string, count as Integer = 1)
method Data as string
method Finalize as boolean
method FinalizeMT as boolean
method SetProperties (options as dictionary = nil)
method SetPropertiesCF (options as Variant)
11 shared methods
This class has no sub classes.
Some examples using this class:
Blog Entries
The items on this page are in the following plugins: MBS MacCG Plugin .
CGGradientMBS
-
CGImageMBS