asp.net - Create dynamic images from WPF User Control inside an HTTP Handler -


i'm using microsoft's pivotviewer control in 1 of silverlight projects. i'm creating jit collection , hoping dynamically generate images based on rendered result of wpf usercontrol. in order generate images i'm using http handler serve images dynamically.

can point me in right direction on how might best go this. it's quite mashup of technologies , bit difficult know best begin.

thanks in advance.

edit: have found guy that's done in asp.net mvc here -

if want stream on http stream wpf visual, pseudo code this:

        rendertargetbitmap bmp = new rendertargetbitmap(width, height, 96, 96, pixelformats.pbgra32);         bmp.render([your wpf visual or control instance]);          // choose format if want other png         pngbitmapencoder png = new pngbitmapencoder();         png.frames.add(bitmapframe.create(bmp));          // stream on web         png.save([the web stream, response.outputstream]); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -