Optimization Connected space: QImage modifying directly with bytes