Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
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 |
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 value. This can be a string in the following format "HSL h s l a", "YUV y u v a", "RGB r g b a", "MONO m a", "GRAY g a" or "COLOR R G B a". Alpha value a is optional. Range of values is 0 to 1.0 except if you use COLOR where RGB values are 0 to 65535. Starting with version 5.4 of our plugin, you can use hex notation. # followed by 2 digits for red, green, blue and optional alpha, e.g. #FF0000 for full red. |
"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 |
Returns position or error.
Finds color in column:
MBS("GMImage.FindColorInColumn"; $img; $x; $y; $ColorToSearch; 1; 3)
Created 4th February 2015, last changed 11st November 2019
GMImage.FillPattern - GMImage.FindColorInRow
Feedback: Report problem or ask question.