let Image = require('../../image');

(async ()  => {
	let img = await Image.read('./ArchersCard.png');
	let pixels = img.data;

	let checksum = 0;

	for(let i=0, l=pixels.length;i<l;i++) {
		checksum += pixels[i];
	}

	console.log("Checksum 1:", checksum);
	await Image.write('./copy.png', img);

	img = await Image.read('./copy.png');

	checksum = 0;

	for(let i=0, l=pixels.length;i<l;i++) {
		checksum += pixels[i];
	}

	console.log("Checksum 2:", checksum);
})();