Content-preserving tone adjustment for image enhancement