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

Bit Depth and Pixel Type Container Types

Forums › TWAIN Classic › Bit Depth and Pixel Type Container Types

  • This topic has 3 replies, 2 voices, and was last updated 13 years, 8 months ago by gabe.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 22, 2007 at 5:13 pm #22162 Reply
    mlmanfredi
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    I know that when I get the current bit depth and pixel type values they can be “one value” or “enumeration” container types. Is it common that a scanner will use only one of these container types? Or might the same scanner use either type depending on the scan settings selected by the user?

    Thanks!

    June 23, 2007 at 3:05 pm #23865 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    in my use, I’ll ask for the available pixel types and I get an enum. From there I’ll set with a onevalue. using oneValue or enum in the set depends somewhat on your intended use, are you trying to set to a value (use oneVal) or limit the user’s chose to a format you support (use enum) – least that’s how I read the spec,

    .

    June 29, 2007 at 1:42 pm #23866 Reply
    mlmanfredi
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    @gabe wrote:

    in my use, I’ll ask for the available pixel types and I get an enum. From there I’ll set with a onevalue. using oneValue or enum in the set depends somewhat on your intended use, are you trying to set to a value (use oneVal) or limit the user’s chose to a format you support (use enum) – least that’s how I read the spec,

    .

    Thanks for your reply. I am not trying to set the value, nor am I trying to limit the user’s choices. I let the scanner driver’s interface handle the scanning. When the scan process is complete and I need to retrieve the results. I am trying to get the current settings so I know what I am retrieving.

    The problem is that I recently discovered I need to support the enum container type. I am trying to locate a scanner in-house that I can test with. All appear to use one-value, but I am wondering if changing their scan settings (using the scanner driver’s scan interface) might cause them to use enum.

    Anyone know?

    June 29, 2007 at 9:17 pm #23867 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    ah, right then. if i were interested the setting that was used during the transfer I would check the tw_ImageInfo structure – tw_ImageInfo.BitsPerPixel and tw_ImageInfo.PixelType.

    If I were somehow unable to get the tw_imageInfo, I would feel pretty confident that I only needed to check for a oneValue, there is *some* chance that you’ll get an enum but I’m thinking if you ask for a oneVal you’ll be ok. I’d be more concerned with (the slim chance that) the approach fails to provide the right info do to the source reseting values after the scan is complete to some default that wasn’t used during the transfer – it’s not likely but it *could* happen,

    If it were me, I’d check the tw_ImageInfo. Some devices might also give useful bits in twei_*.

    .

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Reply #23866 in Bit Depth and Pixel Type Container Types
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

  • Scanner starts transfer when console gets closed (CITRIX)
  • Kodak RFS 3600
  • Didn’t save enough file scan
  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • 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.