Subject: | convert() is used to swap channels a lot, add optimizations for that case |
From several support requests, I've seen people use the convert() method
simply to change the channel order.
The current implementation does (M+1)xN floating point multiplications,
where M is the source channel count and N is the output channel count,
this is overkill for swapping channels around.
Detect the channel swapping case (all channels have one 1 and the rest
0) and optimize for it.