I’m trying to do the exercise at the end of the gaffiti tutorial (https://ocsigen.org/tuto/6.4/manual/application), namely be able to pick a color from the drawing instead of the color picker.
It is advised to use the
Dom_html.get_pixel function. The doc I’ve found here https://ocsigen.org/js_of_ocaml/3.1.0/api/Dom_html#VALpixel_get did not help me a lot.
- how do we build a
- What is the purpose of the int argument in
canvasPixelArray Js.t -> int -> int? Select the channel?