Instanciate a new BlackWhiteImage canvas
id concerned canvas
Adapt canvas' appearance (width/height) according to image
to keep aspect ratio and dimensions
Clear context's canvas
Get binary values [0; 1] from array rgb values [0; 255]
binary image array
HTML Canvas element
Context 2d of canvas
Get scaled dimensions of canvas
width of image
height of image
aspect ratio object {ratio, width, height}
Generated using TypeDoc
BlackWhiteImage class to define a canvas drawing a grayscale image
Lucas Fridez lucas.fridez@he-arc.ch