constructImage function

Generate an image from pixel assignments and color matrix