Can someone point me in the right direction? I am developmenting a batch
process that needs to convert TIF images to BMP format for import into Navision,
which only accepts the BMP format.
I just purchased the AIL_Development product and have no doubt that this will
solve my issue, but getting the code to work is taking a little while.
This is what I was playing with...hard coded in places just while I am learning
how to work with these components. Thanks for any help.
Dim objAIL As New AdvImgLib
Dim hIMG1 As Long
Dim hIMG2 As Long
Set objAIL = New AdvImgLib.cAdvancedImagery
If objAIL.IO_LoadImage("C:\KOFAX\LEADS\data\" & Format(Now, "YYYY-MM-DD") &
"\tif\" & strOrderNo & "-" & strRecordNo & "-0001.tif", hIMG1) = True Then
If objAIL.Convert_ImageToBitmap(hIMG1, hIMG2) = True Then
If objAIL.IO_SaveImage(hIMG1, "C:\32_bit.BMP", _
IF_BMP, BMP_DEFAULT, True) = True Then
MsgBox "Successfull converted image to BMP"
Else
MsgBox "Error - " & objAIL.Error_GetLast
End If
Call objAIL.IO_DestroyImage(hIMG2)
Else
MsgBox "Error - " & objAIL.Error_GetLast
End If
Call objAIL.IO_DestroyImage(hIMG1)
Else
MsgBox "Error - " & objAIL.Error_GetLast
End If
Set objAIL = Nothing