Skip to content

Commit

Permalink
Update android texture loader store
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzibyte committed Dec 14, 2024
1 parent f8f3b31 commit 6f10e23
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using osu.Framework.Graphics.Textures;
using osu.Framework.IO.Stores;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;

namespace osu.Framework.Android.Graphics.Textures
{
Expand All @@ -17,7 +18,7 @@ public AndroidTextureLoaderStore(IResourceStore<byte[]> store)
{
}

protected override Image<TPixel> ImageFromStream<TPixel>(Stream stream)
protected override PremultipliedImage ImageFromStream(Stream stream)
{
using (var bitmap = BitmapFactory.DecodeStream(stream))
{
Expand All @@ -34,7 +35,7 @@ protected override Image<TPixel> ImageFromStream<TPixel>(Stream stream)
}

bitmap.Recycle();
return Image.LoadPixelData<TPixel>(result, bitmap.Width, bitmap.Height);
return PremultipliedImage.FromPremultiplied(Image.LoadPixelData<Rgba32>(result, bitmap.Width, bitmap.Height));
}
}
}
Expand Down

0 comments on commit 6f10e23

Please sign in to comment.