Platforms to show: All Mac Windows Linux Cross-Platform

Back to CIImageMBS class.

CIImageMBS.emptyImage as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an empty image object.
Example
dim image as CIImageMBS = CIImageMBS.emptyImage
MsgBox str(image.Width) // shows zero

Available in OS X v10.5 and later.

CIImageMBS.imageWithCGImage(CGImage as CGImageMBS, colorspace as CGColorSpaceMBS) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object from a Quartz 2D image using the specified color space.

Returns nil on any error.

See also:

CIImageMBS.imageWithCGImage(CGImage as CGImageMBS, options as Dictionary = nil) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object from a Quartz 2D image.

Returns nil on any error.

See also:

CIImageMBS.imageWithCGLayer(CGImage as CGImageMBS, options as Dictionary = nil) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 14.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates and returns an image object from the contents supplied by a CGLayer object, using the specified options.

layer: A CGLayer object. For more information see Quartz 2D Programming Guide and CGLayer Reference.
options: A dictionary specifying image options.

An image object initialized with the contents of the layer object and set up with the specified options.

CIImageMBS.imageWithColor(color as CIColorMBS) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image of infinite extent that is initialized the specified color.

Returns the image object initialized with the color represented by the CIColorMBS object.
Available in OS X v10.5 and later.

CIImageMBS.imageWithContentsOfFile(file as folderitem) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object from the contents of a file.
Example
dim file as FolderItem = SpecialFolder.Desktop.Child("mbs.jpg")
dim image as CIImageMBS = CIImageMBS.imageWithContentsOfFile(file)
Backdrop = image.RenderPicture

Returns nil on any error.

See also:

CIImageMBS.imageWithContentsOfFile(file as folderitem, colorspace as CGColorSpaceMBS) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object from the contents of a file.

Returns nil on any error.

See also:

CIImageMBS.imageWithContentsOfFileMT(file as folderitem) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object from the contents of a file.
Example
dim file as FolderItem = SpecialFolder.Desktop.Child("mbs.jpg")
dim image as CIImageMBS = CIImageMBS.imageWithContentsOfFileMT(file)
Backdrop = image.RenderPicture

Returns nil on any error.

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.
If you run several threads calling MT methods, you can get all CPU cores busy while main thread shows GUI with progress window.

See also:

CIImageMBS.imageWithContentsOfFileMT(file as folderitem, colorspace as CGColorSpaceMBS) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object from the contents of a file.
Example
dim file as FolderItem = SpecialFolder.Desktop.Child("mbs.jpg")
dim cs as CGColorSpaceMBS = CGColorSpaceMBS.CreateDeviceRGB
dim image as CIImageMBS = CIImageMBS.imageWithContentsOfFileMT(file, cs)
Backdrop = image.RenderPicture

Returns nil on any error.

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.
If you run several threads calling MT methods, you can get all CPU cores busy while main thread shows GUI with progress window.

See also:

CIImageMBS.imageWithContentsOfPath(Path as string, colorspace as CGColorSpaceMBS) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object from the contents of a file.
Example
// load image
dim inputimage as CIImageMBS = CIImageMBS.imageWithContentsOfPath("/Library/Desktop Pictures/Rice Paddy.jpg", nil)

// rotate 90°
dim ScaleXFilter as new CIFilterAffineTransformMBS
ScaleXFilter.inputImage = inputimage
dim af as new NSAffineTransformMBS
af.translate(inputimage.height,0)
af.rotateByDegrees(90)
ScaleXFilter.inputTransform=af

// produce output
dim outputimage as CIImageMBS = ScaleXFilter.outputImage
dim e as CGRectMBS = outputimage.Extent
Backdrop = outputimage.RenderPicture
Title = Str(Backdrop.Width)+" x "+str(Backdrop.Height)

// write to PNG file
dim n as NSImageMBS = outputimage.AsNSImageMBS
dim data as string = n.PNGRepresentation

dim f as FolderItem = SpecialFolder.Desktop.Child("test.png")
dim b as BinaryStream = BinaryStream.Create(f, true)
b.Write data
b.Close

Returns nil on any error.

CIImageMBS.imageWithContentsOfURL(url as String) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object from the contents of a file.

Returns nil on any error.

See also:

CIImageMBS.imageWithContentsOfURL(URL as string, colorspace as CGColorSpaceMBS) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object from the contents of a file.

Returns nil on any error.

See also:

CIImageMBS.imageWithData(data as memoryblock, Options as Dictionary = nil) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object initialized with the supplied image data.
Example
dim logo as Picture = LogoMBS(500)
dim jpegData as string = PictureToJPEGStringMBS(logo, 75)
dim image as CIImageMBS = CIImageMBS.imageWithData(jpegData)
Backdrop = image.RenderPicture

data: The data object that holds the contents of an image file (such as TIFF, GIF, JPG, or whatever else the system supports). The image data must be premultiplied.

Returns an image object initialized with the supplied data, or nil if the method cannot create an image representation from the contents of the supplied data object.

CIImageMBS.imageWithDataMT(data as memoryblock, Options as Dictionary = nil) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object initialized with the supplied image data.
Example
dim logo as Picture = LogoMBS(500)
dim jpegData as string = PictureToJPEGStringMBS(logo, 75)
dim image as CIImageMBS = CIImageMBS.imageWithDataMT(jpegData)
Backdrop = image.RenderPicture

data: The data object that holds the contents of an image file (such as TIFF, GIF, JPG, or whatever else the system supports). The image data must be premultiplied.

Returns an image object initialized with the supplied data, or nil if the method cannot create an image representation from the contents of the supplied data object.

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.
If you run several threads calling MT methods, you can get all CPU cores busy while main thread shows GUI with progress window.

CIImageMBS.imageWithPicture(Pic as Picture) as CIImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns an image object from a Xojo Picture.
Example
dim logo as Picture = LogoMBS(500)
dim ci as CIImageMBS = CIImageMBS.imageWithPicture(logo)
dim cg as CGImageMBS = ci.CreateCGImage
Backdrop = cg.Picture

Returns nil on any error.

CIImageMBS.kCIImageAutoAdjustCrop as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
A key used to specify whether to return a filter that crops the image to focus on detected features.

The value associated with this key is a Boolean value. If true, the returned filters include an operation that crops the image around the features specified with the kCIImageAutoAdjustFeatures option (or any features detected in the image, if that option is not present). Supply false to indicate not to return a crop filter. If you don’t specify this option, Core Image assumes its value is false.

Available in OS X v10.10 and later.

CIImageMBS.kCIImageAutoAdjustEnhance as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the Keys used in the options dictionary to control which filters Core Image returns.

A key used to specify whether to return enhancement filters.
The value associated with this key is a CFBoolean value. Supply false to indicate not to return enhancement filters. If you don't specify this option, Core Image assumes its value is true.

CIImageMBS.kCIImageAutoAdjustFeatures as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the Keys used in the options dictionary to control which filters Core Image returns.

A key used to specify an array of features to which to apply enhancement and red eye filter.
The associated value is an array of CIFeatureMBS objects. If you don't supply an array, the receiver will search for features using the CIDetectorMBS class.

CIImageMBS.kCIImageAutoAdjustLevel as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
A key used to specify whether to return a filter that rotates the image to keep a level perspective.

The value associated with this key is a Boolean value. If true, Core Image analyzes the image to determine whether it would benefit from rotation—for example, a landscape photo in which the horizon is not horizontal—and returns a filter to perform that rotation. Supply false to indicate not to return a rotation filter. If you don’t specify this option, Core Image assumes its value is false.

Available in OS X v10.10 and later.

CIImageMBS.kCIImageAutoAdjustRedEye as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the Keys used in the options dictionary to control which filters Core Image returns.

A key used to specify whether to return a red eye filter.
The value associated with this key is a Boolean value. Supply false to indicate not to return a red eye filter. If you don't specify this option, Core Image assumes its value is true.

CIImageMBS.kCIImageTextureFormat as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys in the options dictionary when initializing an image.

The key for an OpenGL texture format. The value for this key must be an NSNumber object containing a Core Image pixel format constant. (See "Pixel Formats.") You may only use this key when initializing an image using the initWithTexture method.
Available in OS X v10.9 and later.

CIImageMBS.kCIImageTextureTarget as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreImage MBS MacCI Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys in the options dictionary when initializing an image.

The key for an OpenGL texture target. The value for this key must be an NSNumber object containing a supported OpenGL texture target constant, either GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB. You may only use this key when initializing an image using the initWithTexture method.
Available in OS X v10.9 and later.

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


The biggest plugin in space...