Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

ArgumentException "Value does not fall within the expected range" when trying to load image on windows #490

Open
Anav0 opened this issue Oct 29, 2022 · 0 comments

Comments

@Anav0
Copy link

Anav0 commented Oct 29, 2022

net7.0-windows10.0.19041.0

  var bytes = File.ReadAllBytes(IMG_PATH);
  using (MemoryStream stream = new(bytes))
  {
      var service = new Microsoft.Maui.Graphics.Win2D.W2DImageLoadingService();
      boardImage = service.FromStream(stream, ImageFormat.Png);
  }

I suspect an issue with image loader. I've tried to load different images with exact same result.

Microsoft.Maui.Graphics.Skia.SkiaImageLoadingService loads an image but then GraphicsView is not displaying it for some reason after calling canvas.DrawImage(boardImage, 10, 10, boardImage.Width, boardImage.Height);

Code: https://github.com/Anav0/Counters.Core

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant