diff --git a/MapControl/WPF/GeoImage.WPF.cs b/MapControl/WPF/GeoImage.WPF.cs index d77ddcb4..a06ecfe8 100644 --- a/MapControl/WPF/GeoImage.WPF.cs +++ b/MapControl/WPF/GeoImage.WPF.cs @@ -11,9 +11,7 @@ namespace MapControl { private static Task LoadGeoTiff(string sourcePath) { - return Task.Run(LoadGeoTiff); - - GeoBitmap LoadGeoTiff() + return Task.Run(() => { BitmapSource bitmap; Matrix transform; @@ -57,7 +55,7 @@ namespace MapControl } return new GeoBitmap(bitmap, transform, projection); - } + }); } private static BitmapSource ConvertTransparentPixel(BitmapSource source, int transparentPixel)