Select Case BIH.biBitCount
Case 1
For cy = BIH.biHeight - 1 To 0 Step -1
For cx = 0 To BIH.biWidth - 1 Step 8
Dim bit As Byte
For bit = 0 To 7
If cx + bit >= BIH.biWidth Then Exit For
With aClrTable((bBMP8(c) \ 2 ^ (7 - bit)) And 1)
SetPixel hdc, cx + bit, cy, RGB(.rgbRed, .rgbGreen, .rgbBlue)
End With
Next
c = c + 1
Next
c = (c + 3) And -4
Next
Case 4
For cy = BIH.biHeight - 1 To 0 Step -1
For cx = 0 To BIH.biWidth - 1 Step 2
With aClrTable(bBMP8(c) \ 16)
SetPixel hdc, cx, cy, RGB(.rgbRed, .rgbGreen, .rgbBlue)
End With
If cx + 1 < BIH.biWidth Then
With aClrTable(bBMP8(c) And 15)
SetPixel hdc, cx + 1, cy, RGB(.rgbRed, .rgbGreen, .rgbBlue)
End With
End If
c = c + 1
Next
c = (c + 3) And -4
Next
Case 8
For cy = BIH.biHeight - 1 To 0 Step -1
For cx = 0 To BIH.biWidth - 1
With aClrTable(bBMP8(c))
SetPixel hdc, cx, cy, RGB(.rgbRed, .rgbGreen, .rgbBlue)
End With
c = c + 1
Next
c = (c + 3) And -4
Next
Select Case BIH.biBitCount
Case 1, 4, 8:
MoveMemory BI.bmiColors(0), aClrTable(0), 4 * 2 ^ BIH.biBitCount
DrawBitmap bBMP8(0)
Сейчас этот форум просматривают: Yandex-бот и гости: 46