Update GeoImage.cs

This commit is contained in:
ClemensFischer 2025-02-23 22:12:53 +01:00
parent 5550556b9f
commit 52dc95c0e7

View file

@ -132,11 +132,12 @@ namespace MapControl
var file = Path.GetFileNameWithoutExtension(sourcePath);
var worldFilePath = Path.Combine(dir, file + ext.Remove(2, 1) + "w");
if (await ImageLoader.LoadImageAsync(sourcePath) is BitmapSource bitmap)
if (File.Exists(worldFilePath))
{
var transform = await ReadWorldFileMatrix(worldFilePath);
return new GeoBitmap(bitmap, transform, null);
return new GeoBitmap(
(BitmapSource)await ImageLoader.LoadImageAsync(sourcePath),
await ReadWorldFileMatrix(worldFilePath),
null);
}
}