implement channel gains and image flips