def decode_int(pool_im, coord):
	"""Helper function that returns uint8 that was encoded
	in pool_im tile starting at pixel at coord.
	"""
	bin_cint = ''
	for i in range(8):
		bin_cint += str(pool_im[ coord[0], coord[1]+i, 0 ] - pool_im[ coord[0]+1, coord[1]+i, 0 ])
	return int(bin_cint, 2)