Public Type tRGBPixel Rouge As Byte Bleu As Byte Vert As Byte End Type Public Function Pix32BitsVers8Bits(ByVal Couleur As Long) As tRGBPixel ' ' Convertit une couleur de 32 bits à 8 bits ' Dim lTmp2 As Long lTmp2 = Couleur And ((2 ^ 8) - 1) Pix32BitsVers8Bits.Rouge = CByte(lTmp2) lTmp2 = Couleur And ((2 ^ 16) - (2 ^ 8) - 1) lTmp2 = lTmp2 / ((2 ^ 8) - 1) Pix32BitsVers8Bits.Vert = CByte(lTmp2) lTmp2 = Couleur And ((2 ^ 24) - (2 ^ 16) - (2 ^ 8) - 1) lTmp2 = lTmp2 / ((2 ^ 16) - 1) Pix32BitsVers8Bits.Bleu = CByte(lTmp2) End Function