Fixed set_white_balance function.
Improved image preprocessing.