mirror of http://192.168.1.51:8099/lmh188/twain3.0
35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
#include "G400ScanConfig.h"
|
||
|
||
G400ScanConfig::G400ScanConfig(GScanCap& gcap)
|
||
{
|
||
cfg.params.doubleFeeded = gcap.hardwarecaps.en_doublefeed == 0 ? 0 : 1;
|
||
cfg.params.dpi = G400_DPI::G400_D200;//gcap.resolution_dst <= 200.0f ? G400_DPI::G400_D200 : (gcap.resolution_dst <= 300.0f ? G400_DPI::G400_D300 : G400_DPI::G400_D600);
|
||
cfg.params.enableLed = 1;
|
||
if (gcap.filter != 3 || gcap.enhance_color)
|
||
cfg.params.isColor = 1;
|
||
else
|
||
cfg.params.isColor = SupPixelTypes[gcap.pixtype];
|
||
cfg.params.enableStable = 0;//gcap.hardwarecaps.en_stapledetect==0?0:1;
|
||
cfg.params.isCorrect = 1;//1 »úÆ÷УÕý
|
||
PaperStatus ps = { gcap.papertype,gcap.paperAlign };
|
||
cfg.params.pageSize = SupPaperTyps[ps];
|
||
CSize size;
|
||
#ifdef G300
|
||
size = PaperSize.GetPaperSize(TwSS::A4, 200.0f, gcap.paperAlign);//G300 ×î´óÖ§³ÖA4·ùÃæ
|
||
#else
|
||
size = PaperSize.GetPaperSize(gcap.papertype, 200.0f, gcap.paperAlign);
|
||
#endif// G300
|
||
cfg.params.dstHeight = (int)((size.cy+200)/100);
|
||
cfg.params.sizedetect = gcap.en_sizecheck;
|
||
cfg.params.reversed1 = cfg.params.reversed2 = 0;
|
||
}
|
||
|
||
G400ScanConfig::~G400ScanConfig()
|
||
{
|
||
}
|
||
|
||
unsigned int G400ScanConfig::GetData()
|
||
{
|
||
return cfg.value;
|
||
}
|