In Blazor Wasm How to load local bitmap file and Decode to SkBitmap #2691
Unanswered
ShingYehGit
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In Blazor/Wasm I have been trying to load local bitmap(*.png .jpg) files and to decode to SKBitmap All the local bitmap(.png *.jpg) have been build as Embeded resource
bitmap(*.png .jpg) being put in "wwwroot/Images/BkImages/"
bitmap(*.png .jpg) being marked and built as Embeded resource
All the below codes are not working....
string DirName = Directory + "BkImages/";
string[] SkyIDs = new string[] { "Blue3.jpg", "BlueSky2.jpg", "BlueSky2.jpg",
"BlueWave.png", "DarkBlue.jpg", "Green12.jpg", "GreenRain.jpg", "GreenYellow2.jpg",
"Hsky1.jpg", "RainSky.jpg" };
BkImages = new SKBitmap[10] { null, null, null, null, null, null, null, null, null, null };
string BkName;
for (int n = 0; n < SkyIDs.Length; n++)
{
BkName = DirName + SkyIDs[n];
}
}
void LoadBkImages()
{
ThisAssembly = GetType().GetTypeInfo().Assembly;
Directory = "Skia1Bmp.Services.Images.";
}
Beta Was this translation helpful? Give feedback.
All reactions