c *= fac# individual bands can still be < 0, even if fac isn'tc[c <0] =0pixmax = self._uint8Max# copies -- could work row by row to minimise memory usager0, g0, b0 = imageRGB# n.b. np.where can't and doesn't short-circuitwithnp.errstate(invalid='ignore', divide='ignor...