Platforms to show: All Mac Windows Linux Cross-Platform
Back to CIImageMBS class.
CIImageMBS.AsNSImageMBS as Variant
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 13.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns nil on error.
Result declared as Variant to avoid plugin dependencies.
CIImageMBS.autoAdjustmentFilters as CIFilterMBS()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
An array of auto adjustment filters to apply to the image. The filters are preset with values for correcting deficiencies in the supplied image.
CIImageMBS.autoAdjustmentFiltersWithOptions(options as dictionary) as CIFilterMBS()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
options: You can control which filters are returned by supplying one or more of the keys described in "Auto Adjustment Keys."
The options dictionary can also contain a CIDetectorImageOrientation key. This key is a number with the same value as defined by the TIFF and EXIF specifications; values can range from 1 through 8. The value specifies where the origin (0,0) of the image is located. If not present, the default value is 1, which means the origin of the image is top, left. For details on the image origin specified by each value, see kCGImagePropertyOrientation.
Returns an array of auto adjustment filters, filtered by the supplied options, to apply to the image. The filters are preset with values for correcting deficiencies in the supplied image.
CIImageMBS.imageByApplyingOrientation(orientation as Integer) as CIImageMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Orientation values from 1 to 8 as defined in the TIFF spec are supported.
Returns original image if the image is of infinite extent.
Possible orientation values:
| Value | orientation | details |
|---|---|---|
| 1 | top left | row 0 top, col 0 lhs |
| 2 | top right | row 0 top, col 0 rhs |
| 3 | bottom right | row 0 bottom, col 0 rhs |
| 4 | bottom left | row 0 bottom, col 0 lhs |
| 5 | left top | row 0 lhs, col 0 top |
| 6 | right top | row 0 rhs, col 0 top |
| 7 | right bottom | row 0 rhs, col 0 bottom |
| 8 | left bottom | row 0 lhs, col 0 bottom |
Some examples using this method:
CIImageMBS.ImageByApplyingTransform(transform as NSAffineTransformMBS) as CIImageMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 7.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
CIImageMBS.imageByClampingToExtent as CIImageMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CIImageMBS.imageByCompositingOverImage(dest as CIImageMBS) as CIImageMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 16.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
dest: An image to serve as the destination of the compositing operation.
Returns an image object representing the result of the compositing operation.
Calling this method is equivalent to using the CISourceOverCompositing filter. To use other compositing operations and blending modes, create a CIFilter object using one of the built-in filters from the CICategoryCompositeOperation category. For details, see Core Image Filter Reference.
Available in OS X v10.4 and later.
CIImageMBS.imageByCroppingToRect(r as CGRectMBS) as CIImageMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 13.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Available in OS X v10.5 and later.
CIImageMBS.normalizeCIImageOrientation(startDeviceOrientation as Integer, isFrontCamera as Boolean = false) as CIImageMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 24.3 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
This checks the current device orientation and the given start orientation to rotate the image to be normal orientation for display.
If front camera parameter is true, the rotation is adjusted by additional 180° rotation.
Returns a new image.
CIImageMBS.properties as Dictionary
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 13.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
If the image is the output of one or more CIFilters, then the metadata of the root inputImage will be returned.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Each retain must have a release. Too many releases and your app will crash, too many retains and it will leak memory.
Use only if you really know what you are doing.
CIImageMBS.RenderNSImage(UseSoftwareRenderer as boolean = false) as Variant
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 7.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Creates a new NSImage, creates a CGContext for it, draws the image into the buffer and returns it as a Xojo object.
Returns nil on failure.
Rendering the image will cause the calculations to be done so this call is quite expensive.
If UseSoftwareRenderer is true, the hardware acceleration is not used.
Some examples using this method:
CIImageMBS.RenderPicture(Width as Integer = 0, Height as Integer = 0, UseSoftwareRenderer as boolean = false) as Picture
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 7.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Creates a new image buffer, creates a CGContext for it, draws the image into the buffer and returns it as a picture with mask. If you need picture with alpha channel, please use RenderPictureWithAlpha function.
Returns nil on failure.
Rendering the image will cause the calculations to be done so this call is quite expensive.
If UseSoftwareRenderer is true, the hardware acceleration is not used.
Some examples using this method:
CIImageMBS.RenderPictureWithAlpha(Width as Integer = 0, Height as Integer = 0, UseSoftwareRenderer as boolean = false) as Picture
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Creates a new image buffer, creates a CGContext for it, draws the image into the buffer and returns it as a Xojo picture with alpha channel.
Returns nil on failure.
Rendering the image will cause the calculations to be done so this call is quite expensive.
If UseSoftwareRenderer is true, the hardware acceleration is not used.
Some examples using this method:
CIImageMBS.RenderPictureWithAlphaMT(Width as Integer = 0, Height as Integer = 0, UseSoftwareRenderer as boolean = false) as Picture
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 15.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Same as the other RenderPictureWithAlpha function, but threaded.
Creates a new image buffer, creates a CGContext for it, draws the image into the buffer and returns it as a Xojo picture with alpha channel.
Returns nil on failure.
Rendering the image will cause the calculations to be done so this call is quite expensive.
If UseSoftwareRenderer is true, the hardware acceleration is not used.
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.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Each retain must have a release. Too many releases and your app will crash, too many retains and it will leak memory.
Use only if you really know what you are doing.
CIImageMBS.scaleTo(width as Integer, height as Integer) as CIImageMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CoreImage | MBS MacCI Plugin | 21.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
We use CILanczosScaleTransform filter internally like in the example code for older plugin versions.
The items on this page are in the following plugins: MBS MacCI Plugin.