|
Tip #10
Let' talk about gradients (in Gimp language). One could say: well, there are fantastic gradients in Gimp, why that? Right, but -afaik- Gmic is not able to access Gimp resources, so if one likes to create a custom Gmic command self-standing, it's better to know how to create gradients to be used for overlaying images and so on.
Recall: to define a new image with predefined colours we need: - 2 parenthesis outside ( ..... ) - a string of numbers inside where: -- points on the same row are separated by commas (,) -- columns are separated by semicolons (;) -- colours are separated by the symbol ^ Values "per-se" are irrelevant, what's important is the proportion among them. At the end we will insert the command -normalize to get visible values.
I write down here some examples of gradients: note the full sequence of commands is written only on gradient 1, for the other only the line related to the gradient is shown ______________________________________________________________________ #gradient 1 (generic)
(2,2,0;2,2,0;0,0,0^0,2,2;2,2,2;2,2,0^0,0,0;0,0,2;0,2,2) -normalize[1] 0,255 -resize[1] [0],3 -keep[1]
#corners: #top-left=red #top-right=green #bottom-left=green #bottom-left=blu
#mid-points: #top=yellow #left=yellow #right=cyan #bottom=cyan ___________________________________________________________________
#gradient 2 (landscape) (0,0,0;0,0,0;3,3,3^0,0,0;3,3,3;1,1,1^2,2,2;3,3,3;0,0,0)
#top-line=blue #mid-line=cyan #bottom-line=red-orange __________________________________________________________________
#gradient 3 (seascape) (0,0,0;1,1,1;0,0,0^1,1,1;3,3,3;2,2,2^2,2,2;3,3,3;2,2,2)
#top-line=blue #mid-line=cyan #bottom-line=red-orange ________________________________________________________________________
#gradient 4 (blue-cyan vignette) (0,3,3,0;2,5,5,2;2,5,5,2;0,3,3,0^1,3,3,1;3,5,5,3;3,5,5,3;1,3,3,1^1,3,3,1;3,5,5,3;3,5,5,3;1,3,3,1)
#corners="dirty"-blue-cyan #mid-points="dirty" white ________________________________________________________________________
#gradient 5 (red-orange vignette) (3,8,8,3;3,11,11,3;3,11,11,3;3,6,6,3^0,2,2,0;2,8,8,2;2,8,8,2;0,2,2,0^0,0,0,0;1,5,5,1;1,5,5,1;0,0,0,0)
#corners="dirty"-red #mid-points="dirty"-orange ===================================================== attached a zipped folder
_________________ "Where am I ?"
|