When I write a program that displays a picture… (BMP), some of the colors are not like they were when I made the picture.

Red is displayed as blue, and cyan as yellow etc.

Why is this so? And what can I do about it?

Hi !

You have swapped the red green and blue components, RGB/BGR.