Platforms to show: All Mac Windows Linux Cross-Platform
Back to PictureMBS class.
PictureMBS.ScaleFast(source as PictureMBS, width as Integer, height as Integer) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 8.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The final image is stored in the PictureMBS object you call this method on.
Returns true on success and false on failure.
This is a low quality algorithm, but it is fast.
This function is optimized for several image formats:
- Gray to Gray.
- RGB to Gray uses R*0.3+G*0.59+B*0.11.
- RGB to RGB.
- Gray to RGB fill red, green and blue with the same gray value.
If an alpha channel exists in both images, it is copied.
Some examples using this method:
PictureMBS.ScaleMT(threads as Integer, source as PictureMBS, temp as PictureMBS, mode as Integer, width as Integer, height as Integer) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Same as Scale, but with additional multithreading.
Threads parameter specifies how many threads you want to use:
A negative value disables threading, zero will use one thread for each CPU core and a positive number specifies the thread count.
If one of the pictures used has IsMapping = true, the plugin calls Scale() function.
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.
Some examples using this method:
PictureMBS.SolarizeFilter(dest as PictureMBS) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
if dest is nil, the picture factory is used to create a new picture.
On success dest or the new picture is returned.
If dest is not nil, it must match the size of the original picture.
Returns nil on any error.
Works with Gray, RGB and CMYK pictures and supports alpha channel.
Some examples using this method:
PictureMBS.StampFilter(dest as PictureMBS, radius as Double, threshold as Double, softness as Double, Black as Color, White as Color) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
if dest is nil, the picture factory is used to create a new picture.
On success dest or the new picture is returned.
If dest is not nil, it must match the size of the original picture.
Returns nil on any error.
Works with Gray and RGB pictures and supports alpha channel.
Some examples using this method:
PictureMBS.TransferFilter(dest as PictureMBS, gray() as Integer) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
if dest is nil, the picture factory is used to create a new picture.
On success dest or the new picture is returned.
If dest is not nil, it must match the size of the original picture.
The array for gray must have 256 entries starting with index 0.
For RGB pictures the gray array is used for all three channels.
Returns nil on any error.
See also:
- TransferFilter(dest as PictureMBS, gray() as Integer, alpha() as Integer) as PictureMBS
- TransferFilter(dest as PictureMBS, red() as Integer, green() as Integer, blue() as Integer) as PictureMBS
- TransferFilter(dest as PictureMBS, red() as Integer, green() as Integer, blue() as Integer, alpha() as Integer) as PictureMBS
Some examples using this method:
PictureMBS.TransferFilter(dest as PictureMBS, gray() as Integer, alpha() as Integer) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
if dest is nil, the picture factory is used to create a new picture.
On success dest or the new picture is returned.
If dest is not nil, it must match the size of the original picture.
The arrays for gray and alpha must have 256 entries starting with index 0.
For RGB pictures the gray array is used for all three channels.
If the picture has no alpha channel, the alpha parameter is ignored.
Returns nil on any error.
See also:
PictureMBS.TransferFilter(dest as PictureMBS, red() as Integer, green() as Integer, blue() as Integer) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
if dest is nil, the picture factory is used to create a new picture.
On success dest or the new picture is returned.
If dest is not nil, it must match the size of the original picture.
The arrays for red, green and blue must have 256 entries starting with index 0.
For grayscale pictures the green array is used for the gray channel.
Returns nil on any error.
See also:
PictureMBS.TransferFilter(dest as PictureMBS, red() as Integer, green() as Integer, blue() as Integer, alpha() as Integer) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
if dest is nil, the picture factory is used to create a new picture.
On success dest or the new picture is returned.
If dest is not nil, it must match the size of the original picture.
The arrays for red, green, blue and alpha must have 256 entries starting with index 0.
For grayscale pictures the green array is used for the gray channel.
If the picture has no alpha channel, the alpha parameter is ignored.
Returns nil on any error.
See also:
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 18.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Pictures with alpha channel must be multiplied, while pictures with mask have the alpha unmultiplied and inverse in the mask.
See also:
Some examples using this method:
PictureMBS.Unmultiply(x as integer, y as integer, width as integer, height as integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 18.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Pictures with alpha channel must be multiplied, while pictures with mask have the alpha unmultiplied and inverse in the mask.
See also:
PictureMBS.UnsharpFilter(origpixels as PictureMBS, Amount as Double, Threshold as Integer) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
You may want to run the BoxBlur filter first before using the unsharp filter.
if dest is nil, the picture factory is used to create a new picture.
On success dest or the new picture is returned.
If dest is not nil, it must match the size of the original picture.
Returns nil on any error.
Works with Gray, RGB and CMYK pictures and supports alpha channel.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 8.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Works with Gray, RGB and CMYK pictures and supports alpha channel.
Some examples using this method:
PictureMBS.YellowChannel as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 11.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns nil if this channel does not exist.
No copy is made of the actual pixel data. Modifying the channel picture will modify the original picture.
Use this function to access the pixels of the channel directly.
The resulting PictureMBS object is a grayscale picture.
The items on this page are in the following plugins: MBS Images Plugin.