Platforms to show: All Mac Windows Linux Cross-Platform
Back to LCMS2TransformMBS class.
LCMS2TransformMBS.ChangeBuffersFormat(InputFormat as UInt32, OutputFormat as UInt32) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Not all transforms can be changed, cmsChangeBuffersFormat only works on transforms created originally with at least 16 bits of precision. This function is provided for backwards compatibility and should be avoided whenever possible, as it prevents transform optimization.
InputFormat: A bit-field format specifier as described in Formatters section.
OutputFormat: A bit-field format specifier as described in Formatters section.
Returns true on success and false on failure.
LCMS2TransformMBS.ToDeviceLink(Version as Double, Flags as UInt32) as LCMS2ProfileMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This profile can then be used by any other function accepting profile handle. Depending on the specified version number, the implementation of the devicelink may vary. Accepted versions are in range 1.0...4.3
Version: The target devicelink version number.
Flags: A combination of bit-field constants kcmsFLAGS_*.
Returns an ICC profile object on success, nil on error.
LCMS2TransformMBS.Transform(bitmap as LCMS2BitmapMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
bitmap: the input and output bitmap.
Returns true on success.
Size of input and output bitmaps must match.
Please make sure RowBytes is either zero for both (block mode) or is correct (row by row mode).
Please make sure input and output color space types of transform match the one in the bitmap.
See also:
LCMS2TransformMBS.Transform(inBitmap as LCMS2BitmapMBS, outBitmap as LCMS2BitmapMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
inBitmap: the input bitmap.
outBitmap: the output bitmap.
Returns true on success.
Size of input and output bitmaps must match.
Please make sure RowBytes is either zero for both (block mode) or is correct (row by row mode).
Please make sure input and output color space types of transform match the those in the bitmaps.
See also:
LCMS2TransformMBS.Transform(InputBuffer as Ptr, OutputBuffer as Ptr, Size as UInt32) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
InputBuffer: A pointer to the input bitmap.
OutputBuffer: A pointer to the output bitmap.
Size: the number of PIXELS to be transformed.
Returns true on success.
See also:
LCMS2TransformMBS.TransformLineStride(inBitmap as Ptr, outBitmap as Ptr, PixelsPerLine as UInt32, LineCount as UInt32, BytesPerLineIn as UInt32, BytesPerLineOut as UInt32, BytesPerPlaneIn as UInt32, BytesPerPlaneOut as UInt32) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 16.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Each bitmap may contain several lines, and every may have padding. The distance from one line to the next one is BytesPerLine{In/Out}. In planar formats, each line may hold several planes, each plane may have padding. Padding of lines and planes should be same across all bitmap. I.e. all lines in same bitmap have to be padded in same way. This function may be more efficient that repeated calls to Transform(), especially when customized plug-ins are being used.
Parameters:
InputBuffer: A pointer to the input bitmap
OutputBuffer: A pointer to the output bitmap.
PixelsPerLine: The number of pixels for line, which is same on input and in output.
LineCount: The number of lines, which is same on input and output
BytesPerLine{In,Out}: The distance in bytes from one line to the next one.
BytesPerPlaneIn{In,Out}: The distance in bytes from one plane to the next one inside a line. Only applies in planar formats.
Returns true on success.
LCMS2TransformMBS.TransformLineStrideMT(inBitmap as Ptr, outBitmap as Ptr, PixelsPerLine as UInt32, LineCount as UInt32, BytesPerLineIn as UInt32, BytesPerLineOut as UInt32, BytesPerPlaneIn as UInt32, BytesPerPlaneOut as UInt32, ThreadCount as Integer = 1) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 19.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Same as TransformLineStride, but with thread support.
ThreadCount: New in MBS Plugin 20.0. If value is zero, we do work on the calling thread. If value is 1, we start a new preemptive thread to do the work and yield on the Xojo thread. If value is >1, we create that many threads and do the split the work to those threads.
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.
LCMS2TransformMBS.TransformMT(bitmap as LCMS2BitmapMBS, ThreadCount as Integer = 1) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 19.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Same as Transform, but with thread support.
ThreadCount: New in MBS Plugin 20.0. If value is zero, we do work on the calling thread. If value is 1, we start a new preemptive thread to do the work and yield on the Xojo thread. If value is >1, we create that many threads and do the split the work to those threads.
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:
- TransformMT(inBitmap as LCMS2BitmapMBS, outBitmap as LCMS2BitmapMBS, ThreadCount as Integer = 1) as boolean
- TransformMT(InputBuffer as Ptr, OutputBuffer as Ptr, Size as UInt32) as boolean
Some examples using this method:
LCMS2TransformMBS.TransformMT(inBitmap as LCMS2BitmapMBS, outBitmap as LCMS2BitmapMBS, ThreadCount as Integer = 1) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 19.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Same as Transform, but with thread support.
ThreadCount: New in MBS Plugin 20.0. If value is zero, we do work on the calling thread. If value is 1, we start a new preemptive thread to do the work and yield on the Xojo thread. If value is >1, we create that many threads and do the split the work to those threads.
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:
LCMS2TransformMBS.TransformMT(InputBuffer as Ptr, OutputBuffer as Ptr, Size as UInt32) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 19.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Same as Transform, but with thread support.
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:
LCMS2TransformMBS.TransformRGB(c as color) as color
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Works for input/output data with Float (4 or 8 byte) or Integer (1, 2 or 4 bytes).
Some examples using this method:
LCMS2TransformMBS.TransformStride(inBitmap as Ptr, outBitmap as Ptr, size as UInt32, Stride as UInt32) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 12.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
On planar-organized buffers, the parameter stride specifies the separation between planes, which may be different of the number of pixels to transform. The main application of this function is when several threads are transforming pixels from different zones of same planar buffer. Otherwise it is identical to other Transform functions.
InputBuffer: A pointer to the input bitmap.
OutputBuffer: A pointer to the output bitmap.
Size: the number of PIXELS to be transformed.
Stride: Plane separation on planar formats
Returns true on success.
LCMS2TransformMBS.TransformStrideMT(inBitmap as Ptr, outBitmap as Ptr, size as UInt32, Stride as UInt32) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | LCMS2 | MBS Images Plugin | 19.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Same as TransformLineStride, but with thread support.
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.
The items on this page are in the following plugins: MBS Images Plugin.
