Let's try using widthStep rather than nChannels and computing the alpha
values.