Improve -[UIImage normalize] and fix bugs