In that case you could implement the contrast and brightness manipulation manually. Saturation and hue manipulations don’t really make sense regarding a grayscale image.
The brightness values should be manipulated additively, while the contrast should be changed multiplicatively. Your new image should therefore be calculated as:
image = image * contrast_factor + brighness_factor