1. A method, comprising: receiving statistical image data for a set of image data, the statistical image data including composite intensity metrics for each of a plurality of color channels for each of a plurality of cells of a subsampling grid; generating a histogram for each of the color channels based on the composite intensity metrics; determining a gain for each of the color channels based on the histograms that maximizes a degree of overlap between the histograms, wherein determining the gain comprises: holding a gain for a selected one of the color channels at unity; iteratively varying the gains of the color channels other than the selected one; and determining the degree of overlap for each iteration; applying the gains for each of the color channels to the set of image data; and storing the set of image data after applying the gains to generate an image data file.