Normalizing images between [0,1]

Is there any way to make sure an image's values are between 0 and 1 instead of 0 and 255 for example? If it is not currently available, how would the implementation look like?