Output of Twain, brightness too hight

Discussions about image processing and document imaging.
Post Reply
wittaya
Posts: 23
Joined: Mon Apr 27, 2009 9:11 am

Output of Twain, brightness too hight

Post by wittaya » Mon Jul 18, 2011 6:57 am

Dear Loïc,

This is my sample code.

Sub Twain_Start()

Dim DefaultSourceName As String = "Plustek OpticSlim 550"
Dim nImageID As Integer = 0
AxGdViewer1.Clear()

AxImaging1.TwainOpenSource(DefaultSourceName)
If AxImaging1.TwainOpenDefaultSource Then

AxImaging1.TwainSetCurrentResolution(300)
AxImaging1.TwainSetCurrentPixelType(GdPicturePro5S.TwainPixelType.TWPT_RGB)
AxImaging1.TwainSetCurrentBitDepth(24)
AxImaging1.TwainSetPaperSize(GdPicturePro5S.TwainPaperSize.None)
AxImaging1.TwainSetHideUI(True)

nImageID = AxImaging1.CreateImageFromTwain(Me.Handle.ToInt32)
If nImageID <> 0 Then
AxImaging1.SetNativeImage(nImageID)
AxImaging1.AutoDeskew()
AxGdViewer1.SetNativeImage(AxImaging1.GetNativeImage)
AxImaging1.SaveAsJPEG("C:\1.jpg", 90)
End If
End If

AxImaging1.TwainCloseSource()

End Sub


When I see the output image file(C:\1.jpg) brightness of image is so white.
I use the same code on winxp sp3 no problem with it, problem is on windows7 enterprise.
Please help me check it.

Thank you

Best regards,
Wittaya
Attachments
untitled.JPG
This is image of source execute on windows7 enterprise

wittaya
Posts: 23
Joined: Mon Apr 27, 2009 9:11 am

Re: Output of Twain, brightness too hight

Post by wittaya » Mon Jul 18, 2011 8:25 am

Dear Loïc,

Sorry I forgot to tell about the version, I use version 5.12.0.1 (but version 5.13.8 is the same problem)

Thank you

Best regards,
Wittaya

wittaya
Posts: 23
Joined: Mon Apr 27, 2009 9:11 am

Re: Output of Twain, brightness too hight

Post by wittaya » Tue Jul 19, 2011 4:33 am

Dear Loïc,

I solved it already by set "Imaging1.TwainSetCurrentBrightness(0)" I don't know why default is 300 but anyway its works fine now.

Best regards,
Wittaya

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Output of Twain, brightness too hight

Post by Loïc » Tue Jul 19, 2011 2:27 pm

Hi Wittaya,

Thank you for the update. I encountered similar twain driver behavior with a canon scanner. On Win7 it increase the default brightness value. I really don't know why.

Kind regards,

Loïc

wittaya
Posts: 23
Joined: Mon Apr 27, 2009 9:11 am

Re: Output of Twain, brightness too hight

Post by wittaya » Thu Jul 21, 2011 10:38 am

Dear Loïc,

Can you do me a favor?
I would like you to check resize function (Imaging1.ResizeImage(width, height)) on windows7 with GRAY image type for me?
I was test it on winxp sp3 not found any problem, but on windows7 the output image seems weird.

This is my code....

AxImaging1.SaveAsJPEG("C:\1.jpg") ' original
AxImaging1.ResizeImage(1454, 1017)
AxImaging1.SaveAsJPEG("C:\2.jpg") ' output

I use version 5.12.0.4

Best regards,
Wittaya
Attachments
untitled.JPG

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Output of Twain, brightness too hight

Post by Loïc » Thu Jul 21, 2011 5:51 pm

Hi,

Please first make a try with latest available version.

Kind regards,

Loïc

wittaya
Posts: 23
Joined: Mon Apr 27, 2009 9:11 am

Re: Output of Twain, brightness too hight

Post by wittaya » Fri Jul 22, 2011 4:25 am

Hello Loïc,

Yes, I tried to test with latest available version 5.13.8, the result is the same.

Regards,
Wittaya

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest