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

Setting Compression for File Transfers

Forums › TWAIN Classic › Setting Compression for File Transfers

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 10 months ago by gabe.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 3, 2008 at 10:19 am #22297 Reply
    caustin
    Participant
    • Topics - 1
    • Replies - 0
    • Total Posts - 1

    Hi,

    I have written my TWAIN code to support file transfers and it is all working fine.

    I’ve figured out how to set the compression used for saving TIFF files using the ICAP_COMPRESSION capability. So when scanning colour, I am using JPEG compression and for B&W I am using G4 compression.

    My question is that the scanner I am using (Fujitsu fi-5900C) supports automatic colour detection via TWAIN. I can change the format of the file when requesting the file from the scanner, but I can’t change the compression.

    So at the moment, I am getting the image info and if it is black and white, requesting a TIFF file and if it is colour, requesting a JPEG. This works fine and if I scan a batch of images this way with auto colour detect on, I get a series of files that are either TIFFs or JPEGs depending on their bit depth.

    However, the TIFF files are uncompressed TIFFs. I have tried changing the compression before getting the image, but it is not valid during this stage (6). I have tried setting the image format to TIFF and compression to Group 4 duting stage 4, but then as soon as I switch to JPEG and back to TIFF, it is reset to no compression.

    Is there any way around this? How should I be doing this?

    March 14, 2008 at 12:28 am #24392 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    @twain spec – pg 435 wrote:

    Note for File transfers:
    Since only certain file formats support compression, this capability must be negotiated after
    setting the desired file format with ICAP_IMAGEFILEFORMAT.

    Try setting ICAP_IMAGEFILEFORMAT Then the compression not the other way around.

    And the bit with trying to set the cap when twstate=6, capabilities can only be negotiated in State 4 (unless special arrangements are made
    using the CAP_EXTENDEDCAPS capability). Search the spec for CAP_EXTENDEDCAPS.

    .

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Setting Compression for File Transfers
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.