G'MIC can make ramps procedurally as a part of image specifications (<width>, <height>, <depth>, <channels>, <procedure>). These fall under the rubric of the -input command.
![]() |
#horizontal ramp \ |
![]() |
#vertical rampgmic 256,256,1,1,'y' -normalize 0,255 |
![]() |
# ramp along any orientation (30 deg or \ |
In the preceding snippets, G'MIC evaluates the fifth parameter, <procedure>, as a G'MIC mathematical expression, described in Section 1.8 of The Handbook. These expressions run pixel-by-pixel, presets like 'x' and 'y' are set to the current column and row, and the pixel at 'x' and 'y' is assigned the results. For a simple expression like 'x', G'MIC assigns the value of the current column to the pixel's intensity and – voilà! – a horizontal ramp is born.
| Ramps, a. k. a. “Gradients” | Warp |