mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 15:36:20 +00:00
Added .NET 8 support
This commit is contained in:
parent
b5c177b563
commit
fa4841d6ca
16 changed files with 47 additions and 60 deletions
|
|
@ -21,18 +21,6 @@ namespace MapControl
|
|||
{
|
||||
public static partial class ImageLoader
|
||||
{
|
||||
#if false
|
||||
public static async Task<SoftwareBitmapSource> LoadImageAsync(BitmapDecoder decoder)
|
||||
{
|
||||
var image = new SoftwareBitmapSource();
|
||||
var bitmap = await decoder.GetSoftwareBitmapAsync(
|
||||
BitmapPixelFormat.Bgra8, BitmapAlphaMode.Premultiplied, new BitmapTransform(),
|
||||
ExifOrientationMode.IgnoreExifOrientation, ColorManagementMode.DoNotColorManage);
|
||||
|
||||
await image.SetBitmapAsync(bitmap);
|
||||
return image;
|
||||
}
|
||||
#else
|
||||
public static async Task<WriteableBitmap> LoadImageAsync(BitmapDecoder decoder)
|
||||
{
|
||||
var image = new WriteableBitmap((int)decoder.PixelWidth, (int)decoder.PixelHeight);
|
||||
|
|
@ -43,7 +31,7 @@ namespace MapControl
|
|||
pixelData.DetachPixelData().CopyTo(image.PixelBuffer);
|
||||
return image;
|
||||
}
|
||||
#endif
|
||||
|
||||
public static async Task<ImageSource> LoadImageAsync(IRandomAccessStream stream)
|
||||
{
|
||||
// WinUI BitmapImage produces visual artifacts with Bing Maps Aerial (or all JPEG?)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue