1 Attachment(s)
Re: Using WIA to scan in VB6
well if i understand the thing you want to do its to save the pictures directly as jpg right?
well if ShowAcquireImage doesnt have built in JPG encoding then you will have to do it by yourself.
and vb6 has not a JPG encode methood built in.
But check this its a compresor that the autor clayms its pair with comercial JPG compresors, and its just 2 class modules and the best of all its free.
i didnt had the chances to test it fully but you might try it.
Check out the zip attached. if you feel its slow i can recomend you a pair of dll+ocx made on c++ to compress jpg.
Re: Using WIA to scan in VB6
Don't use the Picture save method since VB6 cannot save as JPEG.
WIA has built in support for saving as jpeg. Convert to jpeg with code like this:
Dim Img 'As ImageFile
Set Img = CommonDialog1.ShowAcquireImage
If Img.FormatID <> wiaFormatJPEG Then
Dim IP 'As New ImageProcess
Set IP = CreateObject( "Wia.ImageProcess" )
IP.Filters.Add IP.FilterInfos("Convert").FilterID
IP.Filters(1).Properties("FormatID").Value = wiaFormatJPEG
Set Img = IP.Apply(Img)
End If