8 bit histogram equalization