
			let b = Number(c.dataset.brightness);
			if (d < 0)
				b = b - 0.05;
			else
				b = b + 0.05;
			if (b < 0)
				b = 0;
			if (b > 9)
				b = 9;
			c.dataset.brightness = b;
		}

		function contrast_change(c, d) {
			let b = Number(c.dataset.contrast);
			if (d < 0)
				b = b - 5;
			else
				b = b + 5;
			if (b < 0)
				b = 0;
			if (b > 900)
				b = 900;
			c.dataset.contrast = b;
		}

		function apply_transforms(c, i) {
			const x = Number(c.dataset.offsetX);
			const y = Number(c.dataset.offsetY);
