Tint optimisation

Cycle was changed to operations with Mat