use putImageData() in restoreImageData() to avoid unwanted interpolation