| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
GMImage.FindColorInColumn
Locates first pixel in the column with given color.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| GraphicsMagick | 5.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "GMImage.FindColorInColumn"; ImageRef; X; Y; Color { ; Invert; Tolerance } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| ImageRef | The image reference number. | 1 | |
| X | The x coordinate. Zero based from 0 to GMImage.GetWidth-1. | 10 | |
| Y | The y coordinate. Zero based from 0 to GMImage.GetHeight-1. | 10 | |
| Color | A color specification. Multiple formats are supported including various color names and # with hex number. See FAQ for details. |
"RGB 1 0 0" | |
| Invert | If 0, we find first pixel matching your color. If 1 we find first pixel not matching the color. Default is 0. | 0 | Optional |
| Tolerance | The tolerance for comparison. Normally a small value like 3. So if color is 255, 255, 255 and pixel is 252, 252, 252 we have a match for tolerance being 3. | 3 | Optional |
Result
Returns position or error.
Description
Locates first pixel in the column with given color.You can find first pixel matching your given color in the column starting with given y position and given tolerance. If you set Invert to 1, the plugin returns row for first pixel not matching color.
Returns -1 if not found.
Examples
Finds color in column:
MBS("GMImage.FindColorInColumn"; $img; $x; $y; $ColorToSearch; 1; 3)
See also
Example Databases
Blog Entries
This function checks for a license.
Created 4th February 2015, last changed 30th June 2026
MarkDown version: GMImageFindColorInColumn.md