ImageFile.im_scale

ImageFile.im_scale(n, m, dtypeobj_in, dtypeobj, copy=True)

Scaleunsigned/positive integers from n to m bits.

Numbers can be represented exactly only if m is a multiple of n Output array is of same kind as input.