Bonjour,
Voila, j'aimerais faire une fonction qui transforme mes flottants de little <-> big
Voici mon code :
Il plante a la compil et me dis :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 void inverse_octets_float(float * img, int nbvalue) { unsigned char temp[4]; int i; for ( i = 0 ; i < nbvalue ; i ++ ) { temp[0] = (0xFF000000 & img[i]) >> 24; temp[1] = (0x00FF0000 & img[i]) >> 16; temp[2] = (0x0000FF00 & img[i]) >> 8; temp[3] = (0x000000FF & img[i]) ; img[i] = (temp[3] << 24) + (temp[2] << 16) + (temp[1] << 8) + temp[0]; } }
Comment je peux convertir ces floats?operandes invalides pour le binaire &
Merci a vous
Partager