I am a student working on a construction method for under sampled images. I am looking for a group of text books, papers, or web sites that would give me further understanding on how digital cameras apply gain before a raw image is output. More specifically is the Max and Min number of photons collected on the set of sensors used to define a Gain factor and how does this affect the dynamic range. My current concerns are that these max and min values are used causing an issue with under sampled data as a max or min value might not have been sensed. Any references would be greatly appreciated in furthering my understanding of what current day recreational digital cameras are doing before outputting a lossless image format.