Problem with TWAIN and HP Scanjet 8200

N

No Such Luck

Hi All:

I have an HP scanjet 8200 that I am trying to access directly from a
java applet using TWAIN. I am using the lastest driver I can find
(col6906mu1.exe) dated May, 2004. I have several problems:

1) I can specify the java applet to scan the top-left 8.5" x 11"
(UN_INCHES) area of the glass at 150 dpi. However, this should result
in an 1275 x 1650 image, but it results in an 1272 x 1650 image. Any
idea why?

2) Also, it seems like certain scanner features like "autostraighten",
etc. are turned *on* by default. I would like these features turned off
by default. I just want whatever is in the top-left 8.5" x 11" area of
the glass (no corrections!) However, use of many TWAIN functions (e.g.,
setAutoRotate(false)) return an error code of -13, indicating that they
are not supported TWAIN operations. Can this really be, or am I doing
something wrong?

3) If it turns out that the HP Scanjet 8200 has a limited TWAIN command
set, can anyone recommend a good, portable scanner that implementes a
complete TWAIN command set?

Thanks to anyone who can offer help.
 
S

Stewart DIBBS

No Such Luck said:
1) I can specify the java applet to scan the top-left 8.5" x 11"
(UN_INCHES) area of the glass at 150 dpi. However, this should result
in an 1275 x 1650 image, but it results in an 1272 x 1650 image.

Likely this is the way that the scanner DataSource (DS) creates images, with
the number of bytes per line exactly equal to 4. This is the preferred way
that Windows bitmaps are created internally. If theres an odd number of
pixels per line, the bitmap structure still has to have a divisible by 4
number of bytes, and hence pad bytes have to be added. Its tedious but
that's Windows.
2) Also, it seems like ... many TWAIN functions (e.g.,
setAutoRotate(false)) return an error code of -13, indicating that they
are not supported TWAIN operations. Can this really be?

Yes. There's a (supposedly) mandatory subset of TWAIN commands all DS have
to implement, plus a recommended set, and then anything else the OEM wants
to add. Autorotate is not AFAIK one of them. See twain.org for the TWAIN
spec document. Also there is somewhat buggy C source code for the TWACKER
app that can be used to investigate any DS for the supported.

Most cheap scanners only implement the mandatory subset, and sometimes not
even all of that either. Testing is most commonly done with the scanner UI
on, and it also not uncommon that UI-off mode is not fully tested. I've run
across DS that allow setting of eg contrast, the call completes as
successfully done, but the contrast value is not changed: it only works in
UI-on mode.


--
regards,
Stewart DIBBS
========================================
Developer of the PiXCL Image Processing and
Analysis Language for Windows 2000/XP

PiXCL 6.0 is available now ! Build your own scanner
and digicam applications, FAST !

www.vysor.com Gatineau, Quebec, CANADA

========================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top