Loading...

Resolution

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Resolution

Postby fernan » Thu Jan 28, 2010 8:28 am

Greetings Everyone,

Does anybody know how to solve the stated problem below:
- I used AxGdPicturePro4.AxImaging control to scan a document.
Using this function 'Imaging1.TwainShowSetupDialogSource(Me.Handle.ToInt32)' you can set the resolution and etc.
I set 200 but when I scan the document, it is still getting 150 resolution which is the default resolution.
So how to solve this problem? That it should get the resolution set in the Setup Dialog Source.

Kindly check the code below, I used in scanning a multipage document.
Code: Select all
     If Imaging1.TwainOpenDefaultSource() Then

                InitScanConfig()
                nImageCount = 0

                Imaging1.TwainSetAutoFeed(True) 'Set AutoFeed Enabled
                Imaging1.TwainSetAutoScan(True) 'To  achieve the maximum scanning rate

                'nRes = Imaging1.TwainGetCurrentResolution
                If chk11.Checked = False Then
                    'Imaging1.TwainSetCurrentResolution(300)
                    'bFlag = Imaging1.TwainSetCurrentResolution(nRes)
                    bFlag = Imaging1.TwainSetCurrentPixelType(GdPicturePro4.TwainPixelType.TWPT_RGB) 'RGB
                    bFlag = Imaging1.TwainSetCurrentBitDepth(8) ' 24 bpp
                Else
                    'Imaging1.TwainSetCurrentResolution(200)
                    'bFlag = Imaging1.TwainSetCurrentResolution(nRes)
                    bFlag = Imaging1.TwainSetCurrentPixelType(GdPicturePro4.TwainPixelType.TWPT_BW) 'BW
                    bFlag = Imaging1.TwainSetCurrentBitDepth(1) ' 1 bpp
                End If

                Imaging1.PdfNewPdf(m_sFilename)
                While Imaging1.CreateImageFromTwain(Me.Handle.ToInt32) <> 0
                    nImageID = Imaging1.GetNativeImage
                    Call ApplyImageFilters(nImageID)
                    If chk10.CheckState = 1 Then Call DisplayNativeImage()
                    Me.Update()
                    nImageCount = nImageCount + 1
                    Call Imaging1.PdfAddImageFromImageID(nImageID)
                    Imaging1.CloseImage(nImageID)
                    If nPage = 0 Then
                    Else
                        If nImageCount >= nPage Then
                            Exit While
                        End If
                    End If
                End While
                For nCpt = 1 To nImageCount
                    Call Imaging1.PdfSetPageDimensions(Imaging1.PdfGetImageWidth(nCpt), Imaging1.PdfGetImageHeight(nCpt))
                    Imaging1.PdfNewPage()
                    Call Imaging1.PdfDrawImage(nCpt, 0, 0, Imaging1.PdfGetImageWidth(nCpt), Imaging1.PdfGetImageHeight(nCpt))
                    Imaging1.PdfEndPage()
                Next nCpt
                Imaging1.PdfSavePdf()
                Call Imaging1.TwainCloseSource()


Thank you very much in advance.

Best Regards,
fernan
fernan
 
Posts: 9
Joined: Thu Jan 28, 2010 7:35 am

Re: Resolution

Postby Loïc » Thu Jan 28, 2010 9:15 am

Hi Fernan,

Your seem to use GdPicture Pro 4 which is a very very very old edition :)


I suggest you to:

- Migrate to GdPciture Pro 5
- Read carefully these basic explanation to fix or report a TWAIN issue: announces/twain-acquisition-issues-t1486.html

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Resolution

Postby fernan » Thu Jan 28, 2010 10:26 am

Hi Loïc,

Yes you are right i am using an older version. Does this problem has really no solution?

And i tried another option i set the resolution setting using this function Imaging1.TwainSetCurrentResolution(300)
but still it uses the default setting which is 150. By the way I am using HP Scanjet N6010 scanner

Kindly comment again, please.

FYI: I have read a lot of topic or code from yours it is nice i got lot of idea regarding scanning.

Best Regards,
fernan
fernan
 
Posts: 9
Joined: Thu Jan 28, 2010 7:35 am

Re: Resolution

Postby Loïc » Thu Jan 28, 2010 10:50 am

Hi Fernan,

First, you have to know that HP scanners has LOT of troubles regarding contrast/brightness/resolution configuration via TWAIN & WIA. I have an HP scanner here and it is simply catastrophic for configuration...
So I am not sure you will be able to fix this issue probably due to your scanner driver.

I can suggest you

- Try GdPicture Pro 5 :mrgreen: (we can't investigate on GdPciture pro 4, support has been disclosed for this version)
- Make sure you are using the TWAIN driver of your scanner, not WIA
- Try to get latest update of your scanner driver


FYI: I have read a lot of topic or code from yours it is nice i got lot of idea regarding scanning.


It is one of the goad of this forum. i got some nice ideas too :wink:

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Resolution

Postby fernan » Thu Jan 28, 2010 11:11 am

Greetings Loïc,

Thanks for your comments.

Best Regards,
fernan
fernan
 
Posts: 9
Joined: Thu Jan 28, 2010 7:35 am

Re: Resolution

Postby fernan » Wed Feb 10, 2010 9:35 am

Greetings Loïc,

Regarding our resolution problem, you suggest to upgrade to a higher version. Can we assure that the problem will really be solve if we upgrade to a version 5? And do you have any idea about the cost of upgrade?

Kindly comment Loïc.

Thanks and best regards,
fernan
fernan
 
Posts: 9
Joined: Thu Jan 28, 2010 7:35 am

Re: Resolution

Postby Loïc » Thu Feb 11, 2010 5:07 pm

Hi Fernand,


Regarding our resolution problem, you suggest to upgrade to a higher version. Can we assure that the problem will really be solve if we upgrade to a version 5?


No, I suspect your problem caused by your TWAIN driver. HP usually provide VERY bad driver. You should use the HP scanner UI to control parameters.

And do you have any idea about the cost of upgrade?


Yes, it's free !

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Resolution

Postby fernan » Fri Feb 12, 2010 4:03 am

Greetings Loïc,

Thanks for your reply. May I ask you the link where I can get the upgrade version? I tried to find but i can't find it.

Thanks again.

Best Regards,
Fernan
fernan
 
Posts: 9
Joined: Thu Jan 28, 2010 7:35 am

Re: Resolution

Postby Loïc » Fri Feb 12, 2010 11:10 am

Hi Fernan,

Please follow: http://www.gdpicture.com/download/downl ... urepro.php

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Resolution

Postby fernan » Wed Feb 24, 2010 8:18 am

Greetings Loïc,

I installed already the upgrade version 5. In the application we have, the references are "AxInterop.GdpicturePro4.dll" and "Interop.GdpicturePro4.dll" how can i change those to version 5? I only found "Interop.GdpicturePro5.dll" and when i also use this reference it will also add "Ole Automation" or "stdole.dll" but i am not using this in Pro4 version. So I would again ask your kind and hearted support how to change those reference to version 5.

And I have also another question regarding twain feature. In version 4 we have, i cannot see these "TwainIsAutomaticDiscardBlankPagesAvailable" and "TwainIsAutomaticDiscardBlankPagesEnabled".
How about in the upgrade version 5 are these already available?

Kindly comment please.

Thank you.

Best Regards,
Fernan
fernan
 
Posts: 9
Joined: Thu Jan 28, 2010 7:35 am

Re: Resolution

Postby Loïc » Wed Feb 24, 2010 10:02 am

Hi Fernand,

Please do following:

- Open your project
- Remove all references to GdPicture
- Exit your project
- Remove bin & obj folders of your application
- Reopen your project
- Add a reference to gdpicturepro5.ocx
And I have also another question regarding twain feature. In version 4 we have, i cannot see these "TwainIsAutomaticDiscardBlankPagesAvailable" and "TwainIsAutomaticDiscardBlankPagesEnabled".
How about in the upgrade version 5 are these already available?


Hum... These 2 methods are always available in GdPicture Pro 5.

Kind regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Resolution

Postby fernan » Thu Feb 25, 2010 10:16 am

Greetings Loïc,

First thanks for your kind reply. I followed the steps you gave but still i have errors i cannot find the Gdviewer.
I tried to remove the Gdviewer control in the form scan but i can't find how to add the Gdviewer5.
Again Loïc i need your help.

Thanks in advance again Loïc.

Best Regards,
Fernan
fernan
 
Posts: 9
Joined: Thu Jan 28, 2010 7:35 am

Re: Resolution

Postby Loïc » Thu Feb 25, 2010 10:28 am

Hi Fernand !

I feel you a bit astray :)


Well to add a GdViewer object of GdPciture Pro ActiveX on a vb.net forms you can follow these steps (from reference guide):

To add a reference to the GdPicture Pro control in Visual Studio .NET:

• Right-click into the Toolbox Items and select "Add/Remove Items" for visual studio 2003 or "Choose Items" for visual studio 2005 and visual studio 2008.
• Choose the COM tab and check the classe(s) you want to use: (GdPicturePro5.GdViewer or GdPicturePro5.GdViewerCnt or GdPicturePro5.Imaging).
Note: If you can't see the desired box you can add it by clicking into the "Brows.." button.


At this step, you should be able to drag & drop a GdViewer control from the toolbox to your form. isn't it ?

Good luck !

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Resolution

Postby fernan » Fri Feb 26, 2010 8:04 am

Greetings Loïc,

Thanks again Loïc and I am very sorry if you felt something..... regarding my previous question.
I am using now the gdpicturepro5 but i found out that these features are no longer available "SetNegativeEffect",
"SetStretchContrastEffect" and "SetSepiaEffect". How could i still use those features in version 5? What are the features that replaces those previous features?

Kindly comment again Loïc.

Thank you very much.

Best Regards,
Fernan
fernan
 
Posts: 9
Joined: Thu Jan 28, 2010 7:35 am

Re: Resolution

Postby Loïc » Fri Feb 26, 2010 9:47 am

Hi Fernand,


Here your functions name mapping:

SetNegativeEffect -> FxNagative
SetStretchContrastEffect -> FxStretchContrast
SetSepiaEffect -> FxSepia


With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Next

Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 2 guests

cron