Optimized Tone Curve for In-Camera Image Processing