Platforms to show: All Mac Windows Linux Cross-Platform
Back to Picture class.
Picture.GrayScale2MBS(mode as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Graphics & Pictures | MBS Picture Plugin | 15.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success and false on failure.
Modes:
0 | y = 0.33 * R + 0.5 * G + 0.16 * B | Faster version of 3 |
1 | y = 0.375 * R + 0.5 * G + 0.125 * B | Faster version of 3 |
2 | y = 0.2126 * R + 0.7152 * G + 0.0722 * B | Photometric/digital ITU-R |
3 | y = 0.299 * R + 0.587 * G + 0.114 * B | Digital CCIR601 |
Mode 2 and 3 uses doubles and mode 0 and 1 use integers so they should be faster.
Still Mode 0 and 1 are just approximation formulas which trade accuracy for perfomance.
GrayScaleMBS makes a copy of the picture while GrayScale2MBS edits in-place.
Blog Entries
The items on this page are in the following plugins: MBS Picture Plugin.