Home › Forums › TWAIN Classic › Image size
- This topic has 7 replies, 2 voices, and was last updated 16 years, 3 months ago by lalithac.
- AuthorPosts
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!
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?
.
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.
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..
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.
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.
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!
Set PixelFlavor=1, did not work initially, but worked later. I did not change any other settings.
Thanks for all your help.
- AuthorPosts