Check tile size instead of assuming it is always 256.