资源简介

该程序是用qt。调用twain协议库。驱动扫描仪进行扫描,可以双面扫描。扫描结果可以合成pdf文件输出。window平台运行。

资源截图

代码片段和文件信息

#include “stdafx.h“
#include “math.h“
#include “dib.h“
#include 



#define BIG_DISTANCE 10000000L

#define DIST(r1g1b1r2g2b2) \
    (long) (3L*(long)((r1)-(r2))*(long)((r1)-(r2)) + \
    4L*(long)((g1)-(g2))*(long)((g1)-(g2)) + \
    2L*(long)((b1)-(b2))*(long)((b1)-(b2)))


static unsigned char masktable[] = { 0x800x400x200x100x080x040x020x01 };



CDIB::CDIB(HANDLE hDibint nBits)
{
    m_pVoid = nullptr;
    m_pLinePtr = nullptr;
m_bUseGamma=false;
width=height=0;
if(hDib)
{
CreateFromHandle(hDibnBits);
}
}

CDIB::~CDIB()
{
DestroyDIB();
}

void CDIB::DestroyDIB()
{
if(m_pVoid) free(m_pVoid);
    m_pVoid = nullptr;
if(m_pLinePtr) free(m_pLinePtr);
    m_pLinePtr = nullptr;
}


bool CDIB::Create(int widthint heightint bits)
{
/*
Free existing i

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-08-21 09:47  Scan\
     目录           0  2019-08-01 13:56  Scan\Scan\
     文件       16634  2019-07-17 17:59  Scan\Scan\dib.cpp
     文件        2637  2008-04-06 02:35  Scan\Scan\dib.h
     文件        1211  2008-04-05 23:04  Scan\Scan\dibapi.h
     文件        7450  2008-04-05 23:04  Scan\Scan\dibfile.c
     文件       14759  2008-04-05 23:03  Scan\Scan\dibutil.c
     文件        1509  2008-04-05 23:04  Scan\Scan\dibutil.h
     文件        1135  2019-07-22 16:38  Scan\Scan\main.cpp
     文件        3844  2019-07-24 15:00  Scan\Scan\qtwain.cpp
     文件        1618  2019-07-24 15:00  Scan\Scan\qtwain.h
     文件        3512  2019-07-24 15:00  Scan\Scan\qtwaininterface.cpp
     文件        5416  2019-07-24 15:00  Scan\Scan\qtwaininterface.h
     文件        8625  2019-07-24 15:32  Scan\Scan\qtwainmainwindow.cpp
     文件        2434  2019-07-24 15:00  Scan\Scan\qtwainmainwindow.h
     文件          76  2013-07-20 15:39  Scan\Scan\qtwainmainwindow.qrc
     文件         835  2013-07-20 15:39  Scan\Scan\qtwainmainwindow.ui
     文件        2049  2008-04-03 23:36  Scan\Scan\qtwainsubstitute.cpp
     文件        1475  2013-07-20 15:52  Scan\Scan\qtwainsubstitute.h
     文件        1706  2019-07-23 08:49  Scan\Scan\Scan.pro
     文件       46042  2019-08-01 13:56  Scan\Scan\Scan.pro.user
     文件       21301  2019-04-25 17:22  Scan\Scan\scaninterface.cpp
     文件        3643  2019-04-04 15:31  Scan\Scan\scaninterface.h
     文件         914  2003-10-15 20:29  Scan\Scan\stdafx.h
     文件       78080  2013-07-20 15:52  Scan\Scan\twain.h
     文件       15195  2019-07-24 15:00  Scan\Scan\twaincpp.cpp
     文件        2372  2019-07-23 13:56  Scan\Scan\twaincpp.h

评论

共有 条评论