When saving 1-bit TIFF images, some viewers will display the image inverted. This is caused because a 1-bit TIFF doesn't have a palette, but instead uses a TIFF tag to indicate whether bit 0 = white or black.
This problem can be resolved by correcting the palette so bit 0 = white. Here is an example of how to correct the palette:
' Make sure a 1-bit palette is correct.
If ix.Image.ImageType = ixitPalette_1 Then
Dim clr0 As ImgX_Color, clr1 As ImgX_Color
Set clr0 = ix.Image.Palette.GetEntry(0)
Set clr1 = ix.Image.Palette.GetEntry(1)
' clr0 should be white and clr1 should be black.
If (clr0.Blue + clr0.Green + clr0.Red) < (clr1.Blue + clr1.Green + clr1.Red) Then
' The palette needs to be swapped and image data inverted.
ix.Image.Palette.SetEntry 0, clr1
ix.Image.Palette.SetEntry 1, clr0
ix.Filters.Negative
End If
End If