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

Image size

Forums › TWAIN Classic › Image size

  • This topic has 7 replies, 2 voices, and was last updated 13 years ago by lalithac.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • January 23, 2008 at 11:50 pm #22279 Reply
    lalithac
    Participant
    • Topics - 1
    • Replies - 5
    • Total Posts - 6

    The scanned images are nearing 3MB in size. I want to control the size. What option I should use. I could not set the resolution option please help me with sample code.

    Thanks!

    January 24, 2008 at 10:18 am #24316 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    seems like there are several options, drop the pixel type, drop the resolution, use resolution, use a lossy filetype (jpeg are typically smaller), crop the image,…

    part of this depends on the caps available on your device, but you can usually accomplish these things in your programming language of choice outside of twain.

    what kind of scanner/camera are you working with (and planning on supporting moving forward) and what language?

    .

    January 24, 2008 at 8:19 pm #24317 Reply
    lalithac
    Participant
    • Topics - 1
    • Replies - 5
    • Total Posts - 6

    Pixeltype is BW then the file size is with in limit. But I am getting the black image (balck and white are reversed). If I set the image to gray, the file size is too big 3MB, then I am getting a clear image. Kodak i1210 is my scanner. How to set resolution, please give me example if you have one.
    I am using C#.

    Thanks for responding.

    January 24, 2008 at 8:53 pm #24318 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    what is the limit that you’re shoting for?

    if your blank and white are reversed then pixelFlavor is the capability that you want to go play with.

    If I were looking for smaller images I would drop to Kodak’s jfif filetype as while jfif is a lossy format the images that I have taken out of Kodak scanners in that format as acceptable.

    Also if I had the luxury of only having to support Kodak scanners I wouldn’t manipulate resolution by hand, in fact I would manipulate almost any of the caps by hand – I’d let the users build a profile of the settings they want with the scanners Ui, save the profile and play back those setting later. If you browse thru the Cd that came with that scanner you should find a couple of documents maybe even a directory and one of them will have Integrator’s kit in the name. They’ll talk you part way thru the idea.
    Then go read thru the twain spec. Afterward if you’re still looking fro some help manipulating capabilities one by one post back here and I’ll find some code for you.

    .

    January 24, 2008 at 9:12 pm #24319 Reply
    lalithac
    Participant
    • Topics - 1
    • Replies - 5
    • Total Posts - 6

    I set the PixelFlavor to 1, then scanner does not reconize. If it is zero it works and scans balck pictures. I am setting the UI to false. I dod not wat the user to manupulate the settings.

    Actually my goal is to make online scanning on a button click. So I am building windows form with Ui=false and will set this exe on buttong click.

    Please suggest if this a good option or not. Or if you have any better suggestion.

    Thanks for the prompt reply.

    January 24, 2008 at 9:18 pm #24320 Reply
    lalithac
    Participant
    • Topics - 1
    • Replies - 5
    • Total Posts - 6

    Sorry it works for 1 and scans balck and does not work for zero.Ignore the post below

    I set the PixelFlavor to 0, then scanner does not reconize. If it is 1 it works and scans black pictures. I am setting the UI to false. I do not want the user to manupulate the settings.

    Actually my goal is to make online scanning on a button click. So I am building windows form with UI=false and will set this exe on button click.

    Please suggest if this a good option or not. Or if you have any better suggestion.

    Thanks for the prompt reply.

    January 24, 2008 at 9:27 pm #24321 Reply
    lalithac
    Participant
    • Topics - 1
    • Replies - 5
    • Total Posts - 6

    Where exactly does the Scanner store these configuration files.
    Where are the default setting for the scanner stored. When I use UI=true and choose the setting from there, it scans the image correctly. From my code it scans reversly.

    Thanks!

    January 24, 2008 at 10:27 pm #24322 Reply
    lalithac
    Participant
    • Topics - 1
    • Replies - 5
    • Total Posts - 6

    Set PixelFlavor=1, did not work initially, but worked later. I did not change any other settings.

    Thanks for all your help.

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Image size
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.