def loadImage(layout, imagePath="<STR_LIT>", imageObj=None, offset=(<NUM_LIT:0>, <NUM_LIT:0>),<EOL>bgcolor=COLORS.Off, brightness=<NUM_LIT:255>):
if not isinstance(layout, Matrix):<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>texture = [[COLORS.Off for x in range(layout.width)]<EOL>for y in range(layout.height)]<EOL>def setter(x, y, pixel):<EOL><INDENT>if y >= <NUM_LIT:0> and x >= <NUM_LIT:0>:<EOL><INDENT>texture[y][x] = pixel<EOL><DEDENT><DEDENT>show_image(setter, layout.width, layout.height, imagePath, imageObj,<EOL>offset, bgcolor, brightness)<EOL>return texture<EOL>
Display an image on the matrix