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

memory buffer transfer

Forums › TWAIN Classic › memory buffer transfer

  • This topic has 0 replies, 1 voice, and was last updated 13 years ago by guimadox.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • April 7, 2008 at 7:40 pm #22314 Reply
    guimadox
    Participant
    • Topics - 1
    • Replies - 0
    • Total Posts - 1

    I would like to know if there is the possibility to have more information (or a piece of code) on the transfer of compressed images from a dataSource.

    Suppose I want to emulate or to drive a scanner that is able to perform hardware compression (Jpeg, TIFFG4 … ).

    I understand the I could use the buffered memory transfer through the triplet:

    DG_IMAGE, DAT_IMAGEMEMXFER, MSG_GET and get the image in the buffer referenced by:
    pMyXmemStruct->Memory.TheMem (*)

    but the question is:

    In my own DataSource, what should I write in the buffer? A Jpeg file with or without header? or what? And in the case of a a TIFFG4 image?

    Thank you in advance

    guimadox

    (*) here are the data structures used by the buffered memory transfer

    typedef struct {
    TW_UINT16 Compression; /* How the data is compressed */
    TW_UINT32 BytesPerRow; /* Number of bytes in a row of data */
    TW_UINT32 Columns; /* How many columns */
    TW_UINT32 Rows; /* How many rows */
    TW_UINT32 XOffset; /* How far from the side of the image */
    TW_UINT32 YOffset; /* How far from the top of the image */
    TW_UINT32 BytesWritten; /* How many bytes written in Memory */
    TW_MEMORY Memory; /* Mem struct used to pass actual image data */
    } TW_IMAGEMEMXFER, FAR * pTW_IMAGEMEMXFER;

    and:

    typedef struct {
    TW_UINT32 Flags; /* Any combination of the TWMF_ constants. */
    TW_UINT32 Length; /* Number of bytes stored in buffer TheMem. */
    TW_MEMREF TheMem; /* Pointer or handle to the allocated memory buffer. */
    } TW_MEMORY, FAR * pTW_MEMORY;

  • Author
    Posts
Viewing 1 post (of 1 total)
Reply To: memory buffer transfer
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

  • TWAIN for dental imaging integration
  • PDF/R For who and where?
  • Making searchable PDF with PDF/R
  • Backward compatibility with PDF/A and traditional PDF
  • could not open the twain source. Make sure there is a valid source for your sca
  • 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.