Platforms to show: All Mac Windows Linux Cross-Platform
Back to PictureMBS class.
PictureMBS.AlphaChannel as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 8.7 | ✅ 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.
Some examples using this method:
PictureMBS.ApplyMatrix(dest as PictureMBS, MatrixDimension as Integer, matrix() as Integer) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
MatrixDimension: Size of the matrix: 1 to 50. This is the width and height of the matrix.
matrix: The matrix array must contain exactly MatrixDimension*MatrixDimension values. (ubound(matrix)=MatrixDimension*MatrixDimension-1)
delta: Optional value. Default is 0.
ScaleFactor: Optional value. Default is 1.0.
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.
For each pixel in the dest image the following operation is done
- Make sum of all source pixels multiplied with their matrix entry.
- add to the sum the delta value
- multiply the sum by ScaleFactor
A matrix value of 255 or more leaves the dest pixel away from the sum.
Works with Gray, RGB and CMYK pictures and supports alpha channel.
See also:
- ApplyMatrix(dest as PictureMBS, MatrixDimension as Integer, matrix() as Integer, delta as Integer) as PictureMBS
- ApplyMatrix(dest as PictureMBS, MatrixDimension as Integer, matrix() as Integer, delta as Integer, ScaleFactor as Double) as PictureMBS
Some examples using this method:
PictureMBS.ApplyMatrix(dest as PictureMBS, MatrixDimension as Integer, matrix() as Integer, delta as Integer) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
MatrixDimension: Size of the matrix: 1 to 50. This is the width and height of the matrix.
matrix: The matrix array must contain exactly MatrixDimension*MatrixDimension values. (ubound(matrix)=MatrixDimension*MatrixDimension-1)
delta: Optional value. Default is 0.
ScaleFactor: Optional value. Default is 1.0.
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.
For each pixel in the dest image the following operation is done
- Make sum of all source pixels multiplied with their matrix entry.
- add to the sum the delta value
- multiply the sum by ScaleFactor
A matrix value of 255 or more leaves the dest pixel away from the sum.
Works with Gray, RGB and CMYK pictures and supports alpha channel.
See also:
PictureMBS.ApplyMatrix(dest as PictureMBS, MatrixDimension as Integer, matrix() as Integer, delta as Integer, ScaleFactor as Double) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
MatrixDimension: Size of the matrix: 1 to 50. This is the width and height of the matrix.
matrix: The matrix array must contain exactly MatrixDimension*MatrixDimension values. (ubound(matrix)=MatrixDimension*MatrixDimension-1)
delta: Optional value. Default is 0.
ScaleFactor: Optional value. Default is 1.0.
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.
For each pixel in the dest image the following operation is done
- Make sum of all source pixels multiplied with their matrix entry.
- add to the sum the delta value
- multiply the sum by ScaleFactor
A matrix value of 255 or more leaves the dest pixel away from the sum.
Works with Gray, RGB and CMYK pictures and supports alpha channel.
See also:
PictureMBS.AutoLevel as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The histogram is built, white and back points are searched and all pixels adjusted.
Returns true on success and false on any error.
Works only with RGB pictures.
See also:
PictureMBS.AutoLevel(x as Integer, y as Integer, w as Integer, h as Integer) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The histogram is built, white and back points are searched and all pixels adjusted.
Returns true on success and false on any error.
Works only with RGB pictures.
See also:
PictureMBS.BlackChannel 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.
PictureMBS.BlueChannel as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 8.7 | ✅ 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.
PictureMBS.BoxBlurFilter(dest as PictureMBS, Radius as Double, Iterations as Integer, Vertical as boolean = true, Horizontal as boolean = true) 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.
Vertical and Horizontal define whether effect is applied horizontal and/or vertical.
Returns nil on any error.
Works with Gray, RGB and CMYK pictures and supports alpha channel.
See also:
Some examples using this method:
PictureMBS.BoxBlurFilter(dest as PictureMBS, Radius as Double, Vertical as boolean = true, Horizontal as boolean = true) 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.
Vertical and Horizontal define whether effect is applied horizontal and/or vertical.
Returns nil on any error.
Works with Gray, RGB and CMYK pictures and supports alpha channel.
See also:
PictureMBS.BoxBlurFractionalFilter(dest as PictureMBS, Radius as Double) 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 you call BoxBlurFilter and BoxBlurFractionalFilter with a radius of 3.5 the BoxBlurFilter does the 3.0 and BoxBlurFractionalFilter does the 0.5.
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.
Some examples using this method:
PictureMBS.EngraveFilter(dest as PictureMBS, level as Integer) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.2 | ✅ 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.
Level must be between 0 and min(width,height).
Returns nil on any error.
PictureMBS.GainFilter(dest as PictureMBS, gain as Double, bias as Double) 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.
Some examples using this method:
PictureMBS.GammaFilter(dest as PictureMBS, gamma as Double) 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.
See also:
- GammaFilter(dest as PictureMBS, gamma as Double, alphaGamma as Double) as PictureMBS
- GammaFilter(dest as PictureMBS, redGamma as Double, greenGamma as Double, blueGamma as Double) as PictureMBS
- GammaFilter(dest as PictureMBS, redGamma as Double, greenGamma as Double, blueGamma as Double, alphaGamma as Double) as PictureMBS
Some examples using this method:
PictureMBS.GammaFilter(dest as PictureMBS, gamma as Double, alphaGamma as Double) 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.
If the picture has no alpha channel, the alpha parameter is ignored.
Returns nil on any error.
See also:
- GammaFilter(dest as PictureMBS, gamma as Double) as PictureMBS
- GammaFilter(dest as PictureMBS, redGamma as Double, greenGamma as Double, blueGamma as Double) as PictureMBS
- GammaFilter(dest as PictureMBS, redGamma as Double, greenGamma as Double, blueGamma as Double, alphaGamma as Double) as PictureMBS
PictureMBS.GammaFilter(dest as PictureMBS, redGamma as Double, greenGamma as Double, blueGamma as Double) 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.
For grayscale pictures the gray color is calculated from red, green and blue value.
Returns nil on any error.
See also:
PictureMBS.GammaFilter(dest as PictureMBS, redGamma as Double, greenGamma as Double, blueGamma as Double, alphaGamma as Double) 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.
For grayscale pictures the gray color is calculated from red, green and blue value.
If the picture has no alpha channel, the alpha parameter is ignored.
Returns nil on any error.
See also:
PictureMBS.GrayChannel as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 8.7 | ✅ 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.
PictureMBS.GreenChannel as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 8.7 | ✅ 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.
| 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:
| 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.
See also:
PictureMBS.Invert(x as Integer, y as Integer, w as Integer, h as Integer)
| 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.
See also:
PictureMBS.MagentaChannel 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.
PictureMBS.MapInRows(FirstRow as Integer, LastRow as Integer) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 17.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This function does nothing if given rows are already mapped in.
Fails if range is invalid, image is invalid or mapping is not possible.
Returns true if not a mapped image.
Will resize memory buffer size to be big enough for those rows.
PictureMBS.MirroredView as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 10.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
So if the new picture draws into the first row, the change will be in the last row of the original picture.
Some examples using this method:
| 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.Multiply(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.NeonFilter(dest as PictureMBS) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.2 | ✅ 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.
PictureMBS.OilFilter(dest as PictureMBS, levels as Integer, range as Integer) as PictureMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Large Picture | MBS Images Plugin | 9.2 | ✅ 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.
Levels must be between 0 and 256.
Range must be between 0 and min(width,height).
Returns nil on any error.
Works with Gray, RGB and CMYK pictures and supports alpha channel.
PictureMBS.Scale(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 | 8.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The final image is stored in the PictureMBS object you call this method on.
On low memory this function can fail or the image may look bad. (e.g. all black)
The size of the temporary picture must have the size of the destination width and the source height. Use ImageFormatScaling when you create the temp image to give it the correct size. Temp picture may not be mapped.
For scaling with the same size as the picture already has, the scaling is still performed.
Returns true on success and false on any error. (e.g. width=0)
Use the constants for the mod:
| ScaleTriangle | triangle |
| ScaleBox | box, nereast neighbor |
| ScaleLanczos3 | lanczos 3 |
| ScaleLanczos8 | lanczos 8 |
| ScaleMitchell | mitchell |
| ScalePoly3 | poly 3 |
| ScaleCubic | cubic |
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.
The items on this page are in the following plugins: MBS Images Plugin.