Forcasual Things

Forcasual Things

  • NA
  • 14
  • 7.5k

How to pass bitmap variable directly to testimage control

Jul 29 2015 6:34 PM

 

Hi,

    Given below code shows  saving bitmap variable "_current"  saving in a folder "images" and then assigning it to "testimage"  web control.  Initially "_current" has a image. is there anyway I can pass "_current" directly to "testimage" web control? Right now I have to save image in a temporary folder and access it.

Bitmap bmap = ContrastProcessing();

_current = (Bitmap)bmap.Clone();

Random rnd = new Random();

int a = rnd.Next();

_current.Save(Server.MapPath("~/Images/" + a + ".png"));

testimage.ImageUrl = "~/Images/" + a + ".png";


Answers (4)