HGScanner demo修改
This commit is contained in:
parent
d056352880
commit
65b2470793
|
@ -26,7 +26,7 @@ namespace WindowsFormsApp1
|
|||
if (UIntPtr.Zero != image)
|
||||
{
|
||||
HGScannerLib.HGLibSaveImageParam saveParam;
|
||||
saveParam.size = 20;
|
||||
saveParam.size = (UInt32)Marshal.SizeOf(typeof(HGScannerLib.HGLibSaveImageParam));
|
||||
saveParam.jpegQuality = 80;
|
||||
saveParam.tiffCompression = 4;
|
||||
saveParam.tiffJpegQuality = 80;
|
||||
|
@ -176,7 +176,7 @@ namespace WindowsFormsApp1
|
|||
++m_scanCount;
|
||||
|
||||
HGScannerLib.HGLibSaveImageParam saveParam;
|
||||
saveParam.size = 20;
|
||||
saveParam.size = (UInt32)Marshal.SizeOf(typeof(HGScannerLib.HGLibSaveImageParam));
|
||||
saveParam.jpegQuality = 80;
|
||||
saveParam.tiffCompression = 4;
|
||||
saveParam.tiffJpegQuality = 80;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
|
|
|
@ -87,7 +87,7 @@ HGLib_SaveImage = Objdll.HGLib_SaveImage
|
|||
HGLib_SaveImage.argtypes = [ctypes.c_void_p, ctypes.c_char_p, POINTER(HGLibSaveImageParam)]
|
||||
HGLib_SaveImage.restype = ctypes.c_int
|
||||
ImageParam = HGLibSaveImageParam()
|
||||
ImageParam.size = 20
|
||||
ImageParam.size = sizeof(ImageParam)
|
||||
ImageParam.jpegQuality = 80
|
||||
ImageParam.tiffCompression = 4
|
||||
ImageParam.tiffJpegQuality = 80
|
||||
|
@ -181,10 +181,10 @@ imgindex=0
|
|||
def HGLibDeviceScanImageFunc(device: c_void_p, image: c_void_p, param: c_void_p):
|
||||
global imgindex
|
||||
ImageParam = HGLibSaveImageParam()
|
||||
ImageParam.size = 20
|
||||
ImageParam.jpegQuality = 100
|
||||
ImageParam.tiffCompression = 0
|
||||
ImageParam.tiffJpegQuality = 0
|
||||
ImageParam.size = sizeof(ImageParam)
|
||||
ImageParam.jpegQuality = 80
|
||||
ImageParam.tiffCompression = 4
|
||||
ImageParam.tiffJpegQuality = 80
|
||||
ImageParam.ocr = 0
|
||||
print("image call back!!")
|
||||
imgindex+=1
|
||||
|
|
Loading…
Reference in New Issue