generate compressed heightmap from raw image input