You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
I am facing one issue like System.DllNotFoundException after deploying my changes on Dev Environment using Azure pipeline,
Exception The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library liblibSkiaSharp: No such file or directory
I am using this for .Net Standard 2.1 project file.
Code:
using System.IO;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Graphics.Skia;
private string DrawLegendWithLine(String stroke, String strokeWidth )
{
string imageBase64 = "";
// Create a bitmap in memory and draw on its Canvas
SkiaBitmapExportContext bmp = new SkiaBitmapExportContext(100, 50, 1.0f);
ICanvas canvas = bmp.Canvas;
canvas.StrokeColor = Color.FromRgba(stroke);
canvas.StrokeSize = 10;
canvas.DrawLine(100, 0, 0, 0);
using (var ms = new MemoryStream())
{
bmp.WriteToStream(ms);
imageBase64 = Convert.ToBase64String(ms.GetBuffer(), 0, checked((int)ms.Length));
}
return imageBase64;
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi Team,
I am facing one issue like System.DllNotFoundException after deploying my changes on Dev Environment using Azure pipeline,
Exception The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library liblibSkiaSharp: No such file or directory
I am using this for .Net Standard 2.1 project file.
Code:
using System.IO;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Graphics.Skia;
private string DrawLegendWithLine(String stroke, String strokeWidth )
{
string imageBase64 = "";
// Create a bitmap in memory and draw on its Canvas
SkiaBitmapExportContext bmp = new SkiaBitmapExportContext(100, 50, 1.0f);
ICanvas canvas = bmp.Canvas;
canvas.StrokeColor = Color.FromRgba(stroke);
canvas.StrokeSize = 10;
canvas.DrawLine(100, 0, 0, 0);
using (var ms = new MemoryStream())
{
bmp.WriteToStream(ms);
imageBase64 = Convert.ToBase64String(ms.GetBuffer(), 0, checked((int)ms.Length));
}
return imageBase64;
}
The text was updated successfully, but these errors were encountered: