title: What is the algorithm behind Photoshop's Highlight or shadow alteration?
body: <p>I want to write an image enhancement algorithm which is similar to photoshop's highlight and shadows alteration feature. Can you help me regarding what does this feature of photoshop do internally to an image?</p>