Hello, I have been using twain for a while know and I recently noticed a problem that has cropped back up again. On the ImageAcquired event I have a routine that checks the image to make sure it is not an inverted image.
Sub CheckImage(ByVal TheImage As AtalaImage)
If TheImage.PixelFormat = PixelFormat.Pixel1bppIndexed Then
' See if the 0 palette entry is less than the 1 palette entry.
Dim p0 As Color = TheImage.Palette.GetEntry(0)
Dim p1 As Color = TheImage.Palette.GetEntry(1)
If p0.ToArgb() < p1.ToArgb() Then
' Swap the palette entries.
TheImage.Palette.SetEntry(0, p1)
TheImage.Palette.SetEntry(1, p0)
' Invert the image data.
Dim inv As Atalasoft.Imaging.ImageProcessing.Channels.InvertCommand = New Atalasoft.Imaging.ImageProcessing.Channels.InvertCommand
inv.Apply(TheImage)
End If
End If
End Sub
This was working great for a while and now it seems to have stopped working. If I use this sub or not I get an inverted image. The Kodak i30 scanner i am using has a scan utility that when used it creates a correct scanned image. (White background, Black Text) Any information on this would be great. I am not sure if anything has changed in a past build that might be affecting this. Thanks.