Tunable cast remover for digital photographs