Added tiff support.

This commit is contained in:
soukoku
2015-02-18 21:06:07 -05:00
parent b27a9ba4cc
commit daaeb840af
10 changed files with 166 additions and 104 deletions

View File

@@ -143,16 +143,16 @@ namespace NTwain
/// Gets the bitmap from the <see cref="NativeData"/> if it's an image.
/// </summary>
/// <returns></returns>
public Bitmap GetNativeBitmap()
public Image GetNativeImage()
{
Bitmap image = null;
Image image = null;
if (NativeData != IntPtr.Zero)
{
if (PlatformInfo.Current.IsWindows)
if (ImageTools.IsDib(NativeData))
{
image = ImageTools.ReadBitmapImage(NativeData);
}
else if (PlatformInfo.Current.IsLinux)
else if (ImageTools.IsTiff(NativeData))
{
image = ImageTools.ReadTiffImage(NativeData);
}