1. A computer-implemented method for rendering an optimized image, comprising: capturing a raw image via an optical sensor included in a digital camera; processing the raw image to generate raw image statistics related to the raw image, wherein the raw image statistics comprise a plurality of values, each value corresponding to a different statistic that can be computed for an image; causing a first machine learning engine to generate derived image statistics for the raw image based on the raw image statistics, wherein the derived image statistics comprise qualities of the raw image; causing a second machine learning engine to generate a set of rendering control parameters based on the raw image statistics and the derived image statistics, wherein the rendering control parameters select a rendering algorithm and a set of rendering algorithm arguments that correspond to the selected rendering algorithm; and rendering the optimized image by processing the raw image with the rendering algorithm and the set of rendering algorithm arguments.