Techniques for improving image contrast