mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update ImageLoader.WinUI.cs
This commit is contained in:
parent
f8687ad3b7
commit
3cc93c7460
|
|
@ -34,6 +34,7 @@ namespace MapControl
|
||||||
ExifOrientationMode.IgnoreExifOrientation, ColorManagementMode.DoNotColorManage);
|
ExifOrientationMode.IgnoreExifOrientation, ColorManagementMode.DoNotColorManage);
|
||||||
|
|
||||||
pixelData.DetachPixelData().CopyTo(image.PixelBuffer);
|
pixelData.DetachPixelData().CopyTo(image.PixelBuffer);
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -42,13 +43,12 @@ namespace MapControl
|
||||||
// WinUI BitmapImage produces visual artifacts with Bing Maps Aerial (or all JPEG?)
|
// WinUI BitmapImage produces visual artifacts with Bing Maps Aerial (or all JPEG?)
|
||||||
// images in a tile raster, where thin white lines may appear as gaps between tiles.
|
// images in a tile raster, where thin white lines may appear as gaps between tiles.
|
||||||
// Alternatives are SoftwareBitmapSource or WriteableBitmap.
|
// Alternatives are SoftwareBitmapSource or WriteableBitmap.
|
||||||
#if false
|
//
|
||||||
var image = new BitmapImage();
|
// var image = new BitmapImage();
|
||||||
await image.SetSourceAsync(stream);
|
// await image.SetSourceAsync(stream);
|
||||||
return image;
|
// return image;
|
||||||
#else
|
|
||||||
return await LoadImageAsync(await BitmapDecoder.CreateAsync(stream));
|
return await LoadImageAsync(await BitmapDecoder.CreateAsync(stream));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Task<ImageSource> LoadImageAsync(Stream stream)
|
public static Task<ImageSource> LoadImageAsync(Stream stream)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue