replaced numpy with pil pixel access