473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Twain development

I'm currently developing an API of Twain for Java. As Twain is
implemented in C (and in fact Im writing and calling C methods from the
app) I couldn't find a better group to search for twain development
related issues.
Here's my question:
Does anyone know why when I negociate the capabilities ICAP_XRESOLUTION
and ICAP_YRESOLUTION I'm getting all sorts of repeated random values
like:

100, 100, 0, 0, 117, 5, 8, 0, 87, 78, 79, 83, 115, 116, 112, 112, 46,
111, 0, 7, 8, 0, 14, 13, 15, 0, 0, 0, 0, 5.

Im using TW_ENUMERATION as the container to get supported values. When
I use TW_ONEVALUE it works fine (100 for both X and Y). I'm using a
Mitsubishi flatbed scanner as Source.

Any help? Thanks a lot.

Samuel Mendonça

Nov 15 '05 #1
2 3301
samuabreu wrote:
I'm currently developing an API of Twain for Java. As Twain is
implemented in C (and in fact Im writing and calling C methods from the
app) I couldn't find a better group to search for twain development
related issues.
You can't be very good at searching. It took me under 30 seconds to find
the mailing lists over on twain.org.
Here's my question:
Does anyone know why when I negociate the capabilities ICAP_XRESOLUTION


<snip>

All completely off topic here. We only deal with programming in C, not
the billions of pieces of software and libraries that other people have
written in C.

"My toaster has a microcontroler that was programmed in C and it's
burning toast. How do I make it stop toasting before the toast is burnt?"
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 15 '05 #2
Flash Gordon wrote:
samuabreu wrote:
I'm currently developing an API of Twain for Java. As Twain is
implemented in C (and in fact Im writing and calling C methods from the
app) I couldn't find a better group to search for twain development
related issues.

You can't be very good at searching. It took me under 30 seconds to find
the mailing lists over on twain.org.
Here's my question:
Does anyone know why when I negociate the capabilities ICAP_XRESOLUTION

<snip>

All completely off topic here. We only deal with programming in C, not
the billions of pieces of software and libraries that other people have
written in C.

"My toaster has a microcontroler that was programmed in C and it's
burning toast. How do I make it stop toasting before the toast is burnt?"


You can use toast.h, a non-standard C library i just invented:

#include <toast.h>
#include <stdio.h>

#define TOAST_AS_I_LIKE_IT_MINS 3

int main( int iargc, char *cargv[] ){

//We first initialize the toaster.
if( Toaster_Init( TOASTER_GENERIC ) == FALSE )
printf( "\nNo toast for u today :(~" );
return 0;
}

//Check bread ready... :P
if( Toaster_Bread_Or_Other_Toastable_Item_Insert() == TRUE ){

//.... Looking good ....
if( Toaster_Begin_Toast_Op( TOAST_AS_I_LIKE_IT_MINS ) == FALSE ){
printf( "\nNearly had it that time, bugger!" );
return 0;
}

//Don't forget to pop the bread...
if( Toaster_Pop_Bread_Or_Other_Toastable_Item() == FALSE ){
printf( "\nFuck, bread burning, quick nimwit get a knife!" );
return 0;
}
//Always inform the user.
printf( "\nToasting complete, enjoy!" );
}
else{
//Insert bread msg.
printf( "\nNo toastable item inserted into tray %i", Toaster_Tray());
return 0;
}

//Good job.
return 1;
}

P.S. I'm releasing this under GPL.
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ren | last post by:
Hello all, I'm looking for a method, to program TWAIN directly via API calls... Because the Twain OCX under Windows from Kodak is very slow... When I scan via software or the OCX, the TWAIN...
0
by: Neil Benn | last post by:
Hello, Has anyone had any success with python twain? I've downloaded it and run the module however, I'm getting a python core crash when calling to SourceManager.OpenSource. Needless to say,...
0
by: Mikael Olofsson | last post by:
Hi all! Sorry for this rather lengthy post. It's a long preamble followed by a few questions based on that. Here's my situation: I am trying to write a specialized scanner utility for my own...
3
by: Konrad | last post by:
Hi Can you point me articles concerning using of twain drivers for grabbing image from camera. Thanks Konrad
4
by: Chuck Rewood | last post by:
Can somebody here tell me how to access TWAIN from web ? I am gonna make a button to call TWAIN however, the twain.h from (www.twain.org) need some handle from hWnd (System.Windows.Form ??) What...
3
by: DB | last post by:
vb.net. What should I look at for acquiring scanner images? Why? WIA? TWAIN? tks, DB
4
by: Dustin Davis | last post by:
I'm hoping there is a TWAIN expert lurking here somewhere :) I'm writing a very customized application. The software will be set up in multiple location and will always have two types of scanners...
3
by: =?Utf-8?B?UmljYXJkbyBGdXJ0YWRv?= | last post by:
I'm facing what i consider to be a serious problem, because i can't find the solution!!! I've made possible, for the software i'm developing, to aquire images from a scanner using WIA. The problem...
1
by: =?Utf-8?B?UmljYXJkbyBGdXJ0YWRv?= | last post by:
I'm facing what i consider to be a serious problem, because i can't find the solution!!! I've made possible, for the software i'm developing, to aquire images from a scanner using WIA. The problem...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.