Date: 02-16-2022
Return to Index
created by gbSnippets
'Ensure that the 4th byte in the Graphic Get Bits bit string
'is always zero.
'Primary Code:
'Here are 3 different ways to get the job done.
'Mid$
For i = 12 To w*h*4 Step 4 '12 = position of first 4th byte
Mid$(bmp$,i,1) = 0
Next i
'Byte Pointer
Local b as Byte Pointer
b = StrPtr(bmp$)
For i = 12 To w*h*4 Step 4 '12 = position of first 4th byte
b = bstart + i
@b = 0
Next i
'Long Pointer
Local p as Long Pointer
p = StrPtr(bmp$) + 8
For i = 1 to w*h
@p = @p
Incr p
Next i
'gbs_00863
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm