I have a bit map image that I will generate during runtime. I do not have a local url for it as it is generated on runtime this way and returned to me. Is there a way to add this image to cshtml file or html file at runtime?
public Bitmap GetBarcodeImage(string inputString)
{
Bitmap bitmap = new Bitmap(200,100);
Graphics graphics = Graphics.FromImage(bitmap);
graphics.Clear(Color.White);
graphics.DrawString(inputString, new Font("Free 3 of 9",60,FontStyle.Regular), Brushes.Black, new PointF(0, 0));
return bitmap;
}
You could create an asp.net mvc action that returns a FileContentResult that will return the bitmap.
Something like this:
Then in your view of another action you would reference the image using the imageGenerate action