Updated the canvas and found a method for creating a bitmap from pixel array