bugfix #3121: corrected calculation of blue channel index
Merge pull request #1196 from rdm12:bugfix_3121_cvtcolor