修复跳过空白页以及旋转异常
This commit is contained in:
parent
4f8de560eb
commit
68396ff63c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -896,21 +896,21 @@ void CScanner_FreeImage::UpdateList(bool canUpdate/*=true*/)
|
|||
|
||||
if (m_wRotation!=0||m_bBackRotate180)
|
||||
{
|
||||
//m_iaList.push_back(shared_ptr<CImageApply>(new CImageRotation(m_wRotation,m_bBackRotate180)));
|
||||
m_iaList.push_back(shared_ptr<CImageApply>(new CImageApplyRotation((CImageApplyRotation::RotationType)m_wRotation,m_bBackRotate180, m_fXResolution, "C:/Windows/twain_32/HuaGoScan/tessdata/")));
|
||||
|
||||
CImageApplyRotation::RotationType type;
|
||||
if (m_wRotation > 89.0f && m_wRotation < 91.0f)
|
||||
type = CImageApplyRotation::RotationType::Rotate_90_clockwise;
|
||||
else if (m_wRotation > 269.0f && m_wRotation < 271.0f)
|
||||
type = CImageApplyRotation::RotationType::Rotate_90_anti_clockwise;
|
||||
else if (m_wRotation > 179.0f && m_wRotation < 181.0f)
|
||||
type = CImageApplyRotation::RotationType::Rotate_180;
|
||||
else
|
||||
type = CImageApplyRotation::RotationType::Invalid;
|
||||
//CImageApplyRotation::RotationType type;
|
||||
//if (m_wRotation > 89.0f && m_wRotation < 91.0f)
|
||||
// type = CImageApplyRotation::RotationType::Rotate_90_clockwise;
|
||||
//else if (m_wRotation > 269.0f && m_wRotation < 271.0f)
|
||||
// type = CImageApplyRotation::RotationType::Rotate_90_anti_clockwise;
|
||||
//else if (m_wRotation > 179.0f && m_wRotation < 181.0f)
|
||||
// type = CImageApplyRotation::RotationType::Rotate_180;
|
||||
//else
|
||||
// type = CImageApplyRotation::RotationType::Invalid;
|
||||
|
||||
//if (is_autotext)
|
||||
//type = CImageApplyRotation::RotationType::AutoTextOrientation;
|
||||
m_iaList.push_back(shared_ptr<CImageApply>(new CImageApplyRotation(type, m_bBackRotate180, m_fXResolution, "C:/Windows/twain_32/HuaGoScan/tessdata/")));
|
||||
//m_iaList.push_back(shared_ptr<CImageApply>(new CImageApplyRotation(type, m_bBackRotate180, m_fXResolution, "C:/Windows/twain_32/HuaGoScan/tessdata/")));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,11 +95,11 @@ TW_IDENTITY CTWAINDS_Base::m_TheIdentity =
|
|||
#ifdef __APPLE__
|
||||
"\p"
|
||||
#endif
|
||||
"HuaGoScan", // TW_STR32 Manufacturer; Manufacturer name, e.g. "Hewlett-Packard"
|
||||
"HUAGOSCAN", // TW_STR32 Manufacturer; Manufacturer name, e.g. "Hewlett-Packard"
|
||||
#ifdef __APPLE__
|
||||
"\p"
|
||||
#endif
|
||||
"HuaGoScan Hi Series", // TW_STR32 ProductFamily; Product family name, e.g. "ScanJet"
|
||||
"HUAGOSCAN Hi Series", // TW_STR32 ProductFamily; Product family name, e.g. "ScanJet"
|
||||
#ifdef __APPLE__
|
||||
"\p"
|
||||
#endif
|
||||
|
@ -107,11 +107,11 @@ TW_IDENTITY CTWAINDS_Base::m_TheIdentity =
|
|||
|
||||
|
||||
|
||||
"HuaGoScan Hi-5100 TWAIN" // TW_STR32 ProductName; Product name, e.g. "ScanJet Plus"
|
||||
"HUAGOSCAN Hi-2800 TWAIN" // TW_STR32 ProductName; Product name, e.g. "ScanJet Plus"
|
||||
#elif defined G300
|
||||
"HuaGoScan G300 TWAIN"
|
||||
"HUAGOSCAN G300 TWAIN"
|
||||
#elif defined G400
|
||||
"HuaGoScan G400 TWAIN"
|
||||
"HUAGOSCAN G400 TWAIN"
|
||||
//"ZhibenScan XS8100 TWAIN"
|
||||
#endif // G200
|
||||
};
|
||||
|
|
|
@ -117,6 +117,7 @@ void ImageMatQueue::proc()
|
|||
qqImgB = IplImage(mats[1]); // cv::Mat -> IplImage
|
||||
cvSaveImage(csImageB, &qqImgB);
|
||||
#endif // LOG
|
||||
std::swap(mats[0], mats[1]);
|
||||
for (int j = 0; j < m_iaList.size(); j++)
|
||||
{
|
||||
m_iaList[j]->apply(mats, duplexFlag);//需要在每个图像处理apply的部分 增加判断里边的mat是否为空 目前还没加
|
||||
|
@ -130,13 +131,13 @@ void ImageMatQueue::proc()
|
|||
break;
|
||||
}
|
||||
#ifdef LOG
|
||||
CString csImage;
|
||||
csImage.Format("d:\\calc\\%d.jpg", (++num));
|
||||
IplImage qqImg;
|
||||
qqImg = IplImage(mats[i]); // cv::Mat -> IplImage
|
||||
cvSaveImage(csImage, &qqImg);
|
||||
//CString csImage;
|
||||
//csImage.Format("d:\\calc\\%d.jpg", (++num));
|
||||
//IplImage qqImg;
|
||||
//qqImg = IplImage(mats[i]); // cv::Mat -> IplImage
|
||||
//cvSaveImage(csImage, &qqImg);
|
||||
#endif // LOG
|
||||
|
||||
if(!mats[i].empty())
|
||||
m_images.push(mats[i]);
|
||||
if (can_multi_outputR)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerCommand>C:\Program Files %28x86%29\TWAIN Working Group\TWAIN 2.3 App Sample\TWAIN_App_mfc32.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerWorkingDirectory>C:\Windows\twain_32\ZhibenScan</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerCommand>C:\Program Files %28x86%29\XnView\xnview.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerWorkingDirectory>..\..\..\..\..\Windows\twain_32\ZhibenScan</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue