twain-samples's People
Forkers
huyuji mmgu nunorodrigues15 mriehm send2zubair huangxuelun xulong2005 vastrolorde kenya31 g00dnight malfario tsenglinhsu zb872676223 zo-organized frankracis-work brainsucker-na bakitorunoglu mxd198910 jap777 xuxq126 lisha992610 selwoot basak-akan woodyleegit lili19810920 zhao-hangtian sanbrother zzray twtyjvkg 502280728 rahmaabbes jadesnake rayalois22 fengshaoxie bigrussthesolver liguiqing kishoredbn invalid0xcccccccc lvys2018 yangbiaocn seronsecurity maguoshun carlosridder hchack favcode m-zafarifar snolkmg misulache12 ccszwg pk6688 platomda r2d3 vicmatmarssi ghc4 skylertodd rtigithub nealwang123 lonycell asianatix jonesmarlos yushulx adnanturki lflybear bobshsh2 fhd75 hossainel fushuai-fs healthguo tianyu1han superligen willibrandon xiahaobo edw-c tanzeelalam frigiddragon secsandmantwain-samples's Issues
[Bug] Native Transfer is TIFF [sf#26]
*Reported by anonymous on 2010-04-19 15:27 UTC
Update twainapp.cpp to handle native transfer on Linux.
app_sample cannot read ds_sample
hi.
im beginner of twain driver.
first of all, i downloaded this project and compiled successfully.
i used vs2015 and qt4.8.7 on windows10 x64.
i moved compiled TWAINDS_Sample32.ds to "c:\windows\twain_32\sample2" and then that folder is contain FreeImage.dll, TWAIN_App_mfc.exe, TWAINDS_Sample32.ds, TWAINDSM.dll
but when execute TWAIN_App_mfc.exe, the list has nothing and two buttons are disabled.
am i miss something?
and where can i see some guides or what?
i hope you understand my question.
thank you.
Need help to built TWAIN and establish environment
Dear TWAIN fellows,
I have developed many applications using ISIS protocol which is propriety and black box, now I want to go with TWAIN /SANE to develop my own interfacing application for a scanner. please help me or give me documentation in detail to how to configure twain DS and DSM with my application on windows platform (specially to configure the development environment and mandatory requirements). The details provided in the twainsample is confusing me.
Regards,
Kamran
[Bug] Y Resolution not updated following settings dialog [sf#36]
Reported by bartlettpsj on 2014-01-05 17:45 UTC
Only the ICAP_XRESOLUTION is updated in Qt_MainForm. As a quick hack, which seems to work, I added m_pUI->SetCapValueFloat(ICAP_YRESOLUTION,val.toInt()); to void MainForm::on_pComboBox_Resolution_activated(int _nIndex), but would rather this be applied by someone who knows this codebase.
[Bug] Capability containers never free allocated memory [sf#21]
Reported by mihailm on 2009-12-29 17:11 UTC
Capability containers never free allocated memory
[Bug] Bad allocation of TW_ENUMERATION/TW_ARRAY container [sf#12]
Reported by mihailm on 2009-09-10 18:52 UTC
Bad allocation of TW_ENUMERATION/TW_ARRAY container inside CTWAINContainerInt class. It allocates 1 byte more then needed.
[Bug] Scanner Error and Status messages get lost [sf#29]
Reported by jim0watters on 2010-04-22 15:47 UTC
- Better handling of error, warning, and status messages with condition codes
- printError used throughout base class retrieves the last condition code and discards it
- make printError virtual so derived classes can display the message plus have access to the condition code.
- Add control to MFC Sample app to displaying the last or current status.
[Bug] Get Capability returns "unrecognized item type" [sf#38]
Reported by ad-viper on 2014-07-31 14:20 UTC
Hello,
I´m using your twaincstool to implement some scan functions into one program. The problem is, that I can´t figure out, why the enquiries of the capabilities are not working.
As you can see in the first screenshot(output_messages), everything (expect get Entry, it returns BADPROTOCOL) till the capability enquiries works fine.
The enquiry of the Capability regarding xfercount, current capabilities, supported capabilities are in the other screenshots(getCap, get_current_caps,supported_capabilities).
I´ve read the TWAIN-2.3-Spec and searched some time for a solution, I didn´t find anything…
The Problem is, that the capability request fails at the end – when the method want´s an item type, it get´s a number, where I wrote an string like “TWTY_UINT16”.
On screenshot “marshal” in the red square occurs the problem(I think “ItemType” should be a string like “UINT16”, “STR32”, “INT32”, but it´s an number – maybe the address and it maybe contains the needed item type).
Finally that function returns the “ItemType”(random number) and the number is being appended to a string screenshot “TWTY”.
It would be nice, if you could overlook my codesnippets and give me an advice, how to solve my problem. :)
Greetings DK
[Bug] Null pointers not being handled... [sf#33]
Reported by mlmcl on 2011-12-16 09:56 UTC
Numerous places in the code fail to test the DS_Entry data value to see if it's NULL...
[Bug] Error in frame constrain function [sf#13]
Reported by brainsucker on 2009-09-14 18:46 UTC
Several errors were introduced to function CTWAINDS_Base::ConstrainFrameToScanner at rev.42, for example:
if condition compares _nframe.nRight with fMaxValue*1000, but uses just fMaxValue to set frame right border (introducing 1000x error in some cases).
Same situation for every changed line (at rev.42) at this function.
if(pPhysicalWidth && true == pPhysicalWidth->GetCurrent(fMaxValue) && (int)fMaxValue*1000 < _frame.nRight)
{
_frame.nRight = (int)fMaxValue;
bChanged = true;
}
[Bug] ICAP_UNITS works only for Frame, but not for other caps [sf#16]
Reported by mihailm on 2009-10-26 13:46 UTC
ICAP_UNITS works only for Frame, but not for other caps
[Bug] Cannot find FreeImage virtual scanner [sf#40]
Reported by syakimenko on 2016-01-28 13:34 UTC
Hello!
Sample app cannot find FreeImage virtual scanner.
What I do:
- Install Twain sample app;
- Run this one in GUI and in console;
- See empty list of available scanners in both.
What should be:
FreeImage virtual scanner is in list of available scanners in GUI and in console app.
I noticed the bug in Win 7 and Win 10 OS with x32 and x64 versions of installer.
Thank you for your help.
[Bug] Set functions return TWRC_SUCCESS for unsupported containers [sf#10]
Reported by mihailm on 2009-09-10 18:46 UTC
Set functions of CTWAINContainer derivate classes returnsTWRC_SUCCESS for unsupported containers without changing the capability
[Bug] Use of untemplated min() is ambiguous [sf#44]
Reported by silvernexus on 2016-02-02 19:56 UTC
Use of untemplated min in Twain_App_sample01/src/TwainApp.cpp is ambiguous and creates compiler errors in GCC 4.8.
Use of templated min silences these errors. I made it work by templating to TW_UINT32, but should be tested for good measure on other systems.
[Bug] twain.h is missing from .zip [sf#34]
Reported by spike0xff on 2012-08-10 20:12 UTC
In VS2008, both projects in the solution depend on twain.h - TWAIN_APP_CMD lists it explicitly as a Header File, TWAIN_App_mfc just includes it with #include. Neither project will build without it.
I guess I'm assuming that this thing should just build out of the box. Why not?
If you add twain.h to the Common folder, it takes care of this problem.
[Bug] CAP_FEEDERENABLED, CAP_AUTOFEED,ICAP_MAXFRAMES are RO [sf#3]
Reported by mihailm on 2009-08-25 14:19 UTC
CAP_FEEDERENABLED, CAP_AUTOFEED,ICAP_MAXFRAMES - do not support MSG_SET/MSG_RESET
[Bug] Capability containers not initialized [sf#20]
Reported by mihailm on 2009-12-29 17:08 UTC
Capability containers not initialized.
Data source UI freezed while the invoker application is also QT based
I created an app based on QT. When integrating this data source, the UI of this example data source freezed. I guess, it related to the message loop mechanism. But I can't fix this issue. Would you please provide an patch or some advice? Thanks a lot.
This application failed to start because it could not find or load the Qt platform plugin "windows" > in ""
I installed the binaries for the Data Sources in 32 bit and 64 bit. The installation went fine. When I use the Twain App then I can see the data sources; I tested the Twain App on 32 bit and 64 bit architecture. I can also connect to the data sources on both architectures.
However, when I want to perform a scan then I run into an unhandled exception and the following output is displayed (again on both architectures):
This application failed to start because it could not find or load the Qt platform plugin "windows"
in "".Reinstalling the application may fix this problem.
Unfortunately I have no experience with Qt and don't know what the error message means exactly in this case. My guess is that I have to install Qt or part of Qt and set it up in order to make this work.
It would be great if this can be addressed; e.g. explaining in the README file what to install and how to set up so that the virtual Data Sources can perform a scan.
[Bug] Secret Istall! [sf#8]
Reported by awneil on 2009-09-08 07:17 UTC
I downloaded & ran the sample installer.
It gave me no indication whatsoever of where it would install, and no chance to change it!
First a question: Where did it go??
But please fix this so that, at the *very* least, it says where it will install and, vastly preferable, it allows the user to choose the location.
Why does it have to be an installer at all? Can't it just be supplies as a ZIP or whatever - as is usual for source code?
[Bug] CAP_SUPPORTEDCAPS returns one value container on MSG_GETCURR [sf#25]
Reported by mihailm on 2010-04-08 12:42 UTC
CAP_SUPPORTEDCAPS returns one value container on MSG_GETCURRT and MSG_GETDEFAULT
[Bug] Resolution combobox on the UI sets ICAP_XRESOLUTION only [sf#23]
*Reported by anonymous on 2010-04-08 12:25 UTC
Resolution combobox on the UI sets ICAP_XRESOLUTION only, but it should set ICAP_YRESOLUTION as well.
standalone version
https://github.com/tecan/QTScanner i have a standalone version trying to run in src/src folder but im not sure why it gets crash.
[Bug] Negotiation allowed in state 5... [sf#32]
Reported by mlmcl on 2011-12-16 09:53 UTC
Code was set to allow negotiation for both states 4 and 5, when it should only be 4 (unless CAP_EXTENDEDCAP is set, which isn't the case for the sample). A fix has been made...
[Bug] Crash with compressed memory transfer [sf#30]
Reported by jim0watters on 2010-04-22 17:58 UTC
Add support for memory transfer of compressed image data.
[Bug] Changing ICAP_PIXELFLAVOR to TWPF_VANILLA has no effect [sf#7]
Reported by mihailm on 2009-08-25 17:45 UTC
DS does not really support TWPF_VANILLA
[Bug] Native Transfer is PICT [sf#27]
*Reported by anonymous on 2010-04-19 15:28 UTC
Update twainapp.cpp to handle native transfer on Mac.
[Bug] Native transfer DIB handle doesn't respect GlobalLock call [sf#31]
Reported by michalzaganczyk on 2011-11-02 09:15 UTC
It seems that the DIB allocated by the sample data source in native transfer mode is allocated with GPTR flag. The result is that the DIB lock count returned by GlobalFlags(hDIB) is always 0, regardless of GlobalLock(hDIB) calls.
GPTR flag is a combination of GMEM_FIXED and GMEM_ZEROINIT. This makes the GlobalLock calls is pointless on the DIB handle, because for memory allocated with these flags, GlobalFlags function always returns 0, what makes lock count checking impossible.
This can lead to errors in software which relies on tracking of the DIB's lock count (ie. the asynchronous DIB processing in other thread).
I think the bug is here (src/DSMInterface.cpp, lines 215-230):
//////////////////////////////////////////////////////////////////////////////
// The following functions are defined in the DSM2,
// For backwards compatibiltiy on windows call the default function
TW_HANDLE _DSM_Alloc(TW_UINT32 _size)
{
if(g_DSM_Entry.DSM_MemAllocate)
{
return g_DSM_Entry.DSM_MemAllocate(_size);
}
#ifdef TWH_CMP_MSC
return ::GlobalAlloc(GPTR, _size); /* ========== GPTR IS SET HERE ========== */
#endif
return 0;
}
[Bug] DS sample DPI/resampling bug [sf#1]
Reported by brainsucker on 2009-02-08 16:28 UTC
Function FreeImage_ConvertTo24Bits resets DPI of dib to some constant value (indepndent of source image DPI), like 72 for me (current GDI device (monitor) resolution?). Noticed that during extending sample ds to provide arbitary images (thru OpenFileDialog), and getting very long resampling times (for 300 dpi from 2000x3000 -> 8000x1000 is a big piece of work).
solved easily by moving GetDotsPerMeterX/Y (together with new size calculations, anyway they are independent of DPI) before Convert call.
[Bug] ICAP_PHYSICALWIDTH and ICAP_PHYSICALHEIGHT - incorrect value [sf#4]
Reported by mihailm on 2009-08-25 14:20 UTC
ICAP_PHYSICALWIDTH and ICAP_PHYSICALHEIGHT report incorrect values
[Bug] CAP_INDICATORS not implemented [sf#2]
Reported by mihailm on 2009-08-25 14:14 UTC
CAP_INDICATORS not implemented
[Bug] SetCurrent set m_nCurrent=-1 on error [sf#9]
Reported by mihailm on 2009-09-10 18:43 UTC
SetCurrent function of CTWAINContainer derivate classes set m_nCurrent=-1 if value does not exist. This cause later indexin an array with -1
[Bug] DSM library is not free on exit [sf#6]
Reported by mihailm on 2009-08-25 14:45 UTC
DSM library is loaded,but never free
[Bug] App sends different file names in case of Multipage TIFF [sf#22]
Reported by mihailm on 2009-12-29 17:15 UTC
App sends different file names for the images of a Multipage TIFF file.
[Bug] DS must return TWCC_BADVALUE if frame is out of range [sf#18]
Reported by mihailm on 2009-10-26 13:57 UTC
If the requested values exceed the maximum size the Source can acquire, set the
pImageLayout->Frame values used within the Source to the largest extent possible within the
axis of the offending value. Return TWRC_FAILURE with TWCC_BADVALUE.
[Bug] Sample DS blocks image display with browser application... [sf#39]
Reported by mlmcl on 2014-11-25 14:42 UTC
This is the CAPSYS issue. I'm dropping this in here as a reminder for Jon to take a look at the issue, to see if he identifies a fix. The problem is easy to reproduce. Bring up the app, set the driver UI to come up, fix the sample driver to transfer multiple images. It's not possible to see the effect, since the sample uses the same image for all transfers, but monitoring the display window with Spy++ shows that after five seconds the browser is no longer displaying each transfer. At the end of the session the display comes back to life, showing the last one or two images. The working theory is that there may be a COM / WaitForSingleObject issue, but that's about all we have at this point. I do have a workaround that I've developed using CreateWindow, but it's about as subtle as a bulldozer in a china shop...
[Bug] Always crashes with some models of scanners [sf#37]
Reported by msdi on 2014-03-27 10:46 UTC
Hi,
The twain sample app is really useful to debug software when it works. The only problem is that it crashes everytime on certain types of scanner as soon as you connect to the datasource.
The cmd version doesnt crash and works well but naturally don't give as much information and the mfc version.
We have a twain application using dynamsoft web twain ocx and their official method of debugging is to download twain sample app. Our user based as about 2500 installs so when we need to debug we install twain sample app. Most of the time it works very well, but everytime we see an
HP Office Jet (6500,7500,8500,8600) it just crashes as soon as we open the datasource.
The same happens with Kodak i1220 Plus Scanner, it also happens on other models, but these are frequently seen and crash everytime.
It does this on xp, vista, windows 7 and windows 8 so the os doesnt seem to be the cause.
Is that a known issue ? If not, how can I help you ? I can easily test if you give me some tests you want me to do for you.
Regards
[Bug] DSM is loaded just by name, but not by full path [sf#11]
Reported by mihailm on 2009-09-10 18:49 UTC
DSM is loaded just by name, but not by full path. This can cause using other DSM stored in current path or system32 directory instead of this in <Windows directory>
[Bug] Undefined UNUSEDARG macro when compiling in Linux [sf#42]
Reported by silvernexus on 2016-02-02 19:37 UTC
When compiling in Linux, the UNUSEDARG macro used in Twain_App_sample01/src/main.cpp is not defined.
This can be solved by defining UNUSEDARG in common/Common.h.
Attached is a diff of how I made this work. Probably needs testing to ensure this doesn't break other builds.
[Bug] DG_IMAGE / DAT_IMAGELAYOUT / MSG_SET is not working [sf#15]
Reported by mihailm on 2009-10-13 13:29 UTC
DG_IMAGE / DAT_IMAGELAYOUT / MSG_SET is not working, because internal units of m_pICAP_FRAMES are out of sync with DS units
[Bug] CAP_FEEDERENABLE does not support MSG_SET with enumeration [sf#24]
Reported by mihailm on 2010-04-08 12:40 UTC
ICAP_FEEDERENABLE does not support MSG_SET with enumeration
[Bug] TW_BOOL capabilities return OneVlaue on MSG_GET [sf#5]
Reported by mihailm on 2009-08-25 14:25 UTC
TW_BOOL capabilities must return Enumeraton on MSG_GET if application is 2.0 or higher version
[Bug] DS returns FALSE for CAP_UICONTROLLABLE [sf#14]
Reported by mihailm on 2009-09-25 19:28 UTC
DS returns FALSE for CAP_UICONTROLLABLE.
But FALSE means that this Source can only support acquisition with the UI enabled.
[Bug] Frame set with DAT_IMAGELAYOUT is not limit to MIN/MAX [sf#17]
Reported by mihailm on 2009-10-26 13:49 UTC
Frame set with DAT_IMAGELAYOUT is not limit to MIN/MAX size
[Bug] DS ignores ICAP_FRAMES offsets [sf#19]
Reported by mihailm on 2009-12-02 18:26 UTC
DS ignores ICAP_FRAMES offsets
[Bug] Compilation error on GNU/Linux x86_64 with gcc 4.6.3 [sf#35]
Reported by frostasm on 2013-12-11 11:25 UTC
Fixes trivial.
[Bug] Compilation error in Linux from typedefs in TWAIN-Samples/common/CTiffWriter.h [sf#41]
Reported by silvernexus on 2016-02-01 15:29 UTC
When building the samples for Linux, the compiler generates an error in TWAIN-Samples/common/CTiffWriter.h because it has not had uint16_t or uint32_t defined. These are both defined in inttypes.h. Just include that file in the non-win32 build, and it builds.
I attached a diff of the file for good measure, in case my explanation was unclear.
[Bug] Adobe Photoshop cannot be closed after using SampleDS. [sf#28]
Reported by mihailm on 2010-04-21 14:07 UTC
Adobe Photoshop cannot be closed after using SampleDS.
It is QT related problem. Found that it is a problem only with Carbon applications.
Repo doesn't have releases
Repo doesn't have a release dir.
I don't like to build it and install all what needable for it.
Please create a release in a github page of your project.
[Bug] dlclose is used without linging libdl [sf#43]
Reported by silvernexus on 2016-02-02 19:51 UTC
When compiling in Linux, the linker errors out due to undefined references to dlclose.
Adding -ldl to the project definition corrects the linker error.
Added a diff to reduce ambiguity of the fix.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.