Home › Forums › TWAIN Classic › How to use TWAIN C++ to only get an image?
- This topic has 9 replies, 5 voices, and was last updated 13 years, 8 months ago by kpr.
- AuthorPosts
Hi,
I have not done much of this kind of stuff and am really confused.
I just want my application to call something like a pre-built TWAIN GUI interface (for the user to select options from, etc.) and have the scanned image data returned as char* or something like that.
Also, I do not have MFC on my express edition of Visual Studio on Windows.
Thank you in advance.
Hi,
If you don’t want to put too much time on learning the TWAIN specification, you can find some tools (ActiveX, Plug-in, .net component, etc) online, which enables to acquire images from your scanner and even more features.
__________________________
Catherine Sea
TWAIN .NET Component | TWAIN ActiveX/Plug-inThanks.
It’s just that I am trying to make a program that supports TWAIN, so that won’t work.
Is there any way that I could have my application call Twacker and have a char* of image data returned? This way the user can work with Twacker and do whatever he needs to.
.. could you be more specific about how that won’t work?
it seems to me that you either want to roll your own app or you want to use someone elses. if you’re looking for a simple way to ‘support twain’ (i don’t even know what that means anymore and i’m not poking fun at you as much as i’m poking fun at me) then getting an off the shelf solution is a decent way to go. really. i spent a good half year getting my hand rolled twain components to the point where it does what i want (and another year tuning it if i’m being honest here) , either it is worth you time to learn the spec and we’ll help you, or you want a quicker solution and we’ll help you.
pick one.
.
Thanks for the response.
Whoops! My statement that it wouldn’t work was a big misunderstanding by me. Yes, those solutions would definitely work, but I am not sure of how to approach it simply (I am not sure how to use activeX, etc.)I want an off-the-shelf solution that can be used commercially (for free) if it is possible. To be honest, it will take me too long to learn the specification (especially because I am relatively new to programming). Also platform independent is good too.
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.
Thanks in advance.
>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).
Hi,
Thanks for the response Thierry.
Reading all your posts, I think it is best for me to learn the TWAIN specification. I will try to do this.
Thank you all.
@Thierry wrote:
>
– modify the command line project from TWAIN and use temporary files instead of memory pointers. http://sourceforge.net/projects/twain-samples/files/with a few modifications, you can use the twain sample cmd-app as an object in your application and let it return a memory pointer to a DIB.
if you need help, please ask
Thanks, but I have already invested a lot of time in learning the specification 😕
@twainuser123 wrote:
Thanks, but I have already invested a lot of time in learning the specification 😕
well you can still use it as a guide along the way..
- AuthorPosts