transfer y {0,255} to {0, 1}.