mirror of
https://github.com/soukoku/ntwain.git
synced 2025-10-24 10:11:20 +08:00
Added image conversion parts from commonwin32.
This commit is contained in:
@@ -77,6 +77,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\MvvmLightLibs.5.0.2.0\lib\net40\System.Windows.Interactivity.dll</HintPath>
|
||||
|
||||
@@ -289,7 +289,7 @@ namespace Tester.WPF
|
||||
BitmapSource img = null;
|
||||
if (e.NativeData != IntPtr.Zero)
|
||||
{
|
||||
img = e.NativeData.GetWPFBitmap();
|
||||
img = e.GetNativeBitmap().ConvertToWpfBitmap();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(e.FileDataPath))
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CommonWin32;
|
||||
using NTwain;
|
||||
using NTwain;
|
||||
using NTwain.Data;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
@@ -91,7 +90,7 @@ namespace Tester.Winform
|
||||
Bitmap img = null;
|
||||
if (e.NativeData != IntPtr.Zero)
|
||||
{
|
||||
img = e.NativeData.GetDrawingBitmap();
|
||||
img = e.GetNativeBitmap();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(e.FileDataPath))
|
||||
{
|
||||
|
||||
@@ -38,10 +38,6 @@
|
||||
<ApplicationIcon>scanner.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CommonWin32, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a0a4edcfe233918d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\packages\CommonWin32.2.0.5.5\lib\net35-Client\CommonWin32.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
@@ -70,7 +66,6 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CommonWin32" version="2.0.5.5" targetFramework="net35-Client" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user