Image download is blank but element displays correct

downloadgoogle-chromewindows

I have web application which uses WebGL to draw some stuff onto a <canvas> element. The problem is that when I right click on it and choose Save image as..., the resulting download is blank.

I think the problem might be that google chrome needs to be repaired on my computer. (I've had to repair a lot of apps recently after installing new RAM). But, when I select Google Chrome in Programs and Features, there is only an Uninstall option, no Repair option. (I know that for some apps you select Uninstall and then the it gives you the option to repair, but this is not the case for chrome).

Does anyone know a how I can either fix the problem or repair Chrome?

Best Answer

Installing new RAM should not have affected any installed apps. If you had an event that caused corruption, this should be investigated, starting perhaps with studying the health of your disk.

For repairing Chrome :

  • The soft method is to download the latest Chrome installation file and execute it, which will do the same as updating Chrome to a new version.
  • The hard method is to run menu Settings > Reset settings > Restore settings to their original defaults, which return Chrome to a just-installed clean version without bookmarks, extensions etc. This may be followed by the above soft method for good measures.

Chrome should support the viewing of the canvas as an image (test example). If it's not working, this can be because of corruption in Chrome, or because of a mal-programed canvas code, or if this option was purposefully disabled in the webpage.

If an image cannot be saved of the drawn canvas, one brute-force solution would be to take a screenshot of its area.

Related Question