I have a PNG from a database as
byte[]
. How can I set as a HTML image? I use this for PDF creation and the wiki/documentation is sadly lacking... public void HandleImageLoad(object sender, HtmlImageLoadEventArgs args)
{
var img = LoadFromSource();
if(img == null)
{
args.Handled = false;
args.Callback();
Log.Error("Missing image: {0}", args.Src);
}
else
{
args.Handled = true;
args.Callback(img.Data);
}
}