WIA.ImageProcess convert to JPEG - ComAutomation_BadParamCount, Argument:FilterID


  • Hi guys,

    Not really sure if this is the right place for this question, however I am pulling my hair out and wanted to see if anyone can help me. Basicaly I am trying to configure my Silverlight App to connect a local scanner, aquire the image and save it to the databse. I have prety much all of it working, however the WIA.ShowAquireImage is genarating images in Bitmap and I am trying to convert them to JPEG before saving it to the SQL DB. I have implemented this sode:

                    If imageFile.FormatID <> wiaFormatJPEG Then
                        Dim ip As Object = AutomationFactory.CreateObject("WIA.ImageProcess")
                        ip.Filters(1).Properties("FormatID").Value = wiaFormatJPEG
                        ip.Filters(1).Properties("Quality").Value = 20
                        imageFile = ip.Apply(imageFile)
                    End If

    However I am getting ComAutomation_BadParamCount, Argument: FilterID. Can anyone help me or at least point me in the right direction?



    Wednesday, July 20, 2011 11:03 AM


  • If you are tring to convert bitmap to jpg, ImageTools for silverlight will do what you want.

    For details, please refer to

    Wednesday, July 27, 2011 12:05 PM