Performing proper image contrast adjustment without information loss is an art. The default settings are often inappropriate for the image in question rendering a contrast adjustment depending on trial and error. We propose a simple method, rank-based transformation (RBT), for image contrast adjustment that requires no prior knowledge. This makes RBT an ideal first tool to apply for underexposed images. The RBT algorithm normalizes and equalizes all the intensity differences of the image over the full intensity range of the image data type, and thus assigning equal weight to all gradients. Even the state-of-the-art AI tool Cellpose visually benefits from RBT preprocessing. Our comparison of histogram normalization methods demonstrates the ability of RBT to bring out image features.