optimizations: gray color (memory), resize (smooth)