This example interprets the bitwise value returned by the CompressionInfo property. It is limited to black-and-white compression types only.
Private Sub cmdCompInfo_Click()
'This routine interprets the bitwise value returned in the
'CompressionInfo property. This example is limited to black
'and white compression types only.
Dim lngCompInfo As Long
lngCompInfo = ImgEdit1.CompressionInfo
'Load form which has check boxes for various compression
'options and check the options which are applicable to the
'file.
Load frmCompInfo
If lngCompInfo And 1 Then 'file has EOL's
frmCompInfo.chkEOL.Value = 1
Else
frmCompInfo.chkEOL.Value = 0
End If
If lngCompInfo And 2 Then 'file has packed lines
frmCompInfo.chkPackedLines.Value = 1
Else
frmCompInfo.chkPackedLines.Value = 0
End If
If lngCompInfo And 4 Then 'file has prefix EOL's
frmCompInfo.chkPreEOL.Value = 1
Else
frmCompInfo.chkPreEOL.Value = 0
End If
If lngCompInfo And 8 Then 'Compressed bit order, Left-To-Right
frmCompInfo.chkCompRBO.Value = 1
Else
frmCompInfo.chkCompRBO.Value = 0
End If
If lngCompInfo And 16 Then 'Expanded bit order, Left-To-Right
frmCompInfo.chkExpRBO.Value = 1
Else
frmCompInfo.chkExpRBO.Value = 0
End If
If lngCompInfo And 32 Then
frmCompInfo.chkNegate.Value = 1 'Black and white are inverted on expansion
Else
frmCompInfo.chkNegate.Value = 0
End If
frmCompInfo.Show
End Sub