Write and scan received image