How can I stop the alpha-premultiplication with canvas imageData?

Is there a way to stop the premultiplication of the alpha channel for canvas data, or a workaround? I want to generate an image (in this case some random rgba values) and save the canvas as an image. During the second step, I want to compare the original image with the generated image using the imageData, however this won’t work due to the premultiplication of the alpha channel of my rgba pixels in the generated image. The example In the console, you will find two console.log outputs. The first before the premultiplication, and the second after the premultiplication. These two