TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

Delphi Twain

Forums › TWAIN Classic › Delphi Twain

  • This topic has 7 replies, 4 voices, and was last updated 13 years, 1 month ago by Keith.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • December 20, 2006 at 10:12 am #22060 Reply
    Wernervt
    Participant
    • Topics - 1
    • Replies - 0
    • Total Posts - 1

    I am currently trying to add a section in a program that i am devoloping in Delphi that allows you to scan a picture into the programme. Does anyone know where i can find a free twain component for delphi or how would i go about it?

    Thank you so much

    December 22, 2006 at 10:23 am #23560 Reply
    pauldude
    Participant
    • Topics - 1
    • Replies - 3
    • Total Posts - 4

    There are a couple of free ones, but they are rubbish and usually require a third-party dll to be included in your distribution. We use a non-free third party tool called Envision, but we have since modified it so much that it is virtually a whole new system.

    Before you spend too much time and effort writing your own TWAIN integration check out our Quickscan (http://www.burrotech.com/quickscan.php) – it is a low cost command line scanning utility that supports jpeg, bmp, tif and pdf output as well as allowing you to set resolution, adf, duplex etc.

    Paul
    Burrotech

    October 5, 2007 at 2:43 pm #23561 Reply
    Benedictum
    Participant
    • Topics - 3
    • Replies - 11
    • Total Posts - 14

    http://delphitwain.sourceforge.net/

    November 29, 2007 at 10:45 pm #23562 Reply
    Keith
    Participant
    • Topics - 0
    • Replies - 3
    • Total Posts - 3

    @Benedictum wrote:

    http://delphitwain.sourceforge.net/

    Downloaded this – it appears simple to set up and use… but how can I get it to work with 48 Bit colour – the scanner supports 48Bit colour (Epson V700) but sample application hangs when 48Bit colour selected, and scanned.

    Thanks.

    November 30, 2007 at 1:34 am #23563 Reply
    Benedictum
    Participant
    • Topics - 3
    • Replies - 11
    • Total Posts - 14

    What happens on a lower resolution setting? Were you able to scan? What image format are you using? Remember that 48-bit images take a lot of memory.

    November 30, 2007 at 1:49 am #23564 Reply
    Keith
    Participant
    • Topics - 0
    • Replies - 3
    • Total Posts - 3

    In the lower Bit depth resolution it works perfectly OK. In the higher bit depth, you can watch the progress bar proceed… but then you get an “Access violation at address 00402851 in module ‘Example.exe’. Write of address 5165729E, when the progress bar is around 1/2 way through.

    Looking with the debugger into this address is not that informative – as it doesnt take you into a line of Delphi Code, but into a section of assembly.

    It appears to me, that the image is being sent to some block of memory that hasn’t had enough space assigned for the 48Bit image (which will be around 2X that of the standard 24Bit colour I expect.)

    It doesnt matter which image format (for transfer I expect you mean) I use, the same problem occurs. Ultimately, I just want to grab one of the RGB colours and then window down into that to process a type of X-ray film.

    Keith.

    November 30, 2007 at 2:22 am #23565 Reply
    Benedictum
    Participant
    • Topics - 3
    • Replies - 11
    • Total Posts - 14

    I would look into the OnTwainAcquire event. This is where the bitmap is assign into a holding variable. What I did was to convert the bitmap right into a tJpegImage type variable. I then change the compression and did a conversion to grayscale. This might not be pertinent in your case, just throwing some ideas…

    November 30, 2007 at 3:18 am #23566 Reply
    Keith
    Participant
    • Topics - 0
    • Replies - 3
    • Total Posts - 3

    Thanks for the suggestion – heres what happens…

    Placing a break point at the TwainTwainAcquire event – the program has failed before this point is reached… so I expect this is only called after the image has been grabbed by the scanner.

    As for the Jpeg – I would guess that 48 bits would be stripped down to 24 bits as I am unsure if Jpeg supports 48 Bit colour – but as I am no expert – I could be wrong?

    Keith.

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Delphi Twain
Your information:




Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • Problem enumerating list of installed scanners in windows server 2012
  • Failed to create TWAIN progress! Error code is 1260.
  • To get the list of scanners from javascript client side (browser)
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.