J'ai besoin de convertir les images bitmap en textures. Donc pour cela j'écris du code c pour analyser bitmap.Je suis capable d'analyser les données bitmap rgb et l'afficher.Mais la couleur ne vient pas correctement. Son image 32bit. (ARGB)Le chargeur de bitmap n'affiche pas la couleur correctement
int pixels = width * height * 4;
unsigned char* data = new unsigned char[pixels];
const int row = width * 4;
const int colomn = height;
unsigned char* datarow = new unsigned char[row];
unsigned char data1[pixels];
#if 1
fseek(f, 54,SEEK_SET);
fread(data, sizeof(unsigned char), pixels, f);
fclose(file);
#endif
for(int i = 0; i < colomn; i++) {
for(int j = 0; j < row; j++)
{
data1[j+i*row] = data[j+((colomn-i)*row)];
}
}