Forum Replies Created
- AuthorPosts
>Basically I was thinking of calling an application like Twacker and having the image data forwarded to my application as a char* or something similar.
Well this could be done, of course, but you need to change so many things inside Twacker to achieved that, specially using an Express Edition, that, well, it makes it painfully useless.
So my suggestions will be :
– try a .Net component you can use with an Express Edition
– get rid of the Express Edition and do it with a ‘real’ edition, using MFC or Win32 native APIs in C++
– modify the command line project from TWAIN and use temporary files instead of memory pointers. http://sourceforge.net/projects/twain-samples/files/The solution which does twacker running with an Express Edition and exchanges memory pointers is a nightmare to do (of course I never tried it so I could be wrong).
TW_STR32 is Multi Byte and you’re trying to use a Wide Char pointer to acces it, you just can’t (without blowing up your software).
You need to convert it using MultiByteToWideChar … or to compile in multibyte instead of unicode wide char.Try negotiate ICAP_COMPRESSION before starting the transfer…
I don’t know what you expect from DAT_IMAGEMEMXFER concerning compression ?
Also inside my transfer loop I check again if the data received is compressed (sometimes, DS compresses images even if I negotiate TWCP_NONE), using DAT_IMAGEINFO after I receive a TWRC_XFERDONE from DAT_IMAGEMEMXFER.
@Mike Kirkby wrote:
I sent an email to Fujitsu raising the fact that they are setting dynamic thresholding via the ini file only and not using custom caps.
They initially said they would not fix it, but after pointing out that Kodak and Canon provide TWAIN capabilities or custom caps to do this, they have agreed to address the issue in the next release of their TWAIN driver, where they will add a custom cap to allow you to flick between Fixed Processing, SDTC and Advanced DTC modes.
Mike
I hope you’re right, they never agreed to do anything like that before …
Also if you obtain the ‘FTS’ file specification you’ll be very lucky. I had to reverse engineered it (this way I can set the Advanced DTC’ mode or any GUI option not provided directly as a capability).@polo wrote:
Hi,
iam already using the i40 driver in simulation mode. Also Twain sample source, but the sample source has limited capabilities, kodak is much better.You are trying to say that i can generaly switch any driver to simulation mode?
Have a good day.
p.No you can’t, but with Kodak drivers I can simulate almost any kind of Kodak scanners in the same range, not just one model.
But more generally, using this simulator, you can assume (not at 100% of course) that your application is good enough to work with many scanners, not only Kodak.
Of course if you ‘hardcode’ some Kodak custom capabilities, you can’t.@polo wrote:
Hello sir!
Thank you a lot.I will to try get Kodak, if it fails i will go for others you mentioned.
Thank you a lot.
P.If you want to test the Kodak driver, you don’t even need to buy a scanner, that’s the major difference between Kodak and the other manufacturers …
The TWAIN driver has a simulator mode for a range of scanners, so you can develop and integrate without the hardware in a first step. What you could develop for a high volume Kodak scanner should work also with other manufacturers scanners (that’s what I did), with very few modifications.@polo wrote:
Can we say that some wendor writes better drivers than others?
Thanks.
Sure we can …
My personal list :
1 – Kodak (all models)
2 – Inotec (all models)
3 – Panasonic (all models)
4 – Fujitsu (all models)
5 – HP (only high volume scanners)
6 – HP (low volume scanners)
7 – Canon 9080C (the worst implementation ever, mainly based on an ugly TWAIN hack to support ISIS from PixelTranslation)This is from my own experience, so it may not be same compared to other developers on this forum. From 1 to 5 (included) I can work with them. Below 5 the nightmare begins …
After you receive the last image, so after you leave the image transfer loop, why don’t you do a timer with Get/CAP_FEEDERLOADED, and if TRUE : EnableDS ?
From my point of view, if your code leaves the loop, there are two reasons, first there’s no page in the feeder, or second, the user took too much time to put paper in the feeder and the driver reached its timeout, disabling DS. I assume that you want to restart scanning in the second case.
@fortunece wrote:
internal class TwRANGE{
ushort ItemType;
uint MinValue; /* Starting value in the range. */
uint MaxValue; /* Final value in the range. */
uint StepSize; /* Increment from MinValue to MaxValue. */
uint DefaultValue; /* Power-up value. */
uint CurrentValue; /* The value that is currently in effect. */
}In fact the range can be negative, from -1000 to +1000 for ICAP_BRIGHTNESS, ICAP_CONTRAST …
@jandriver wrote:
Hi everybody.
We are looking for a flatbed A4 scanner with those capabilities, but at the moment we haven’t found anyone.
Is that usual? do you know anyone?
If not, how do you programme those functionalities in your applications? do you use any image treatment libraries? Our target application is developed in Java.
Thanks in advance.
My Agfa scanner (e42 with a black background) has this function in the TWAIN driver, not sure it is exposed as a capability. Usually flatbeds scanners have limited capability concerning deskew and auto-crop, because it is based on the image itself, any application can do that. In the feeder you can have additional sensors to help you, and it is more efficient and useful.
This functionality is based on extraction of the border of the image assuming that the foreground is black, and the border of the image is white. Extracting all the borders points (transition from black to white) gives you 4 lines approximated (to have a minimal distance between the approximated line and the points). Then you have to choose two skews (top or bottom and left or right, or a mean value …) and rotate the image, then crop.
You should find many papers to implement this function whit a lot a of different approaches.
January 19, 2010 at 2:38 pm in reply to: Data sources are disappeared in the Select Source dialog. #25105@Gil Ho Jang wrote:
@Thierry wrote:
Don’t forget that the Fujitsu driver reads and writes its templates files directly to C:WindowsTWAIN_32 subfolders, so be sure to have rights for any user to these folders.
I’ll visit our customer and check the rights on the customer’s problematic PC soon.
By the way, what is the templates files for ? Do you mean a Fujitsu scanner specific configurations or something like that ?
Thanks.
On the TWAIN GUI you will see a set of pre-defined settings for the scanner, and you can add your own sets of parameters. These settings are simply files (an obscure ini format) in the driver folder, .fts extension if I remember well.
@Billie wrote:
Ok, another Question:
The Image (850 x 1100 Pixels) is transfered in 15 chunks.
14 x 76 Rows = 1064
1 x 35 Rows = 35
----
1099
====
One row is missing?!
You can take a look at the source code for the DS, maybe it’s a bug, assuming a loop 0 to 1099 gives 1100, but in your output you should have 36 lines at the end.
I’m pretty sure its a bug, they mix offsets and ‘number of lines’, offsets start at 0, but ‘number of lines’ starts at 1 …
In memory transfer you need to anticipate the real size of your buffer based on columns*rows with the correct size in bytes for each row (depends on columns, bits per pixels, and alignment per row). Generally you should have a function in your code to handle mis-aligned rows in memory (I code in C++ so I can’t help you a lot in how to do that in Java).
January 18, 2010 at 7:41 pm in reply to: Data sources are disappeared in the Select Source dialog. #25101Don’t forget that the Fujitsu driver reads and writes its templates files directly to C:WindowsTWAIN_32 subfolders, so be sure to have rights for any user to these folders.
Your image is mis-aligned.
If you try in native mode, you won’t have this behavior right ?
In memory mode, you must re-align each line in memory if necessary. Add the necessary extra bytes at the end.
I don’t remember if it has to be 32bits aligned, but it is something like that.
It looks like the output is correct anyway -> 850 columns -> 852 bytes.
So try to dump it in BMP uncompressed format instead of JPG, I don’t know how your object is working.- AuthorPosts