<?php
$eol = "\r\n";
$img = imagecreatefrompng(__DIR__ . "/inner-tor-map-2.png");

$map = array();
for ($y = 0; $y < 48; $y++) {
	$map[$y] = array();
	for ($x = 0; $x < 64; $x++) {
		$u = 255 & imagecolorat($img, $x, $y);
		$v = 255 & imagecolorat($img, 64 + $x, $y);

		$map[$y][$x] = (object)array(
			'u' => $u,
			'v' => $v,
		);
	}
}
file_put_contents(__DIR__ . "/inner-tor-map.json", json_encode($map));
