문제

I have a .NET windows application that collects ink using Microsoft.Ink from Microsoft Tablet PC SDK and stores it in a database. That's working fine.

Now I need to display this ink as an image in an ASP.NET application.

Note that I don't need to capture any strokes in the web application. Just display the already captured strokes as an image. I don't know how to proceed. I think I can't use Renderer.Draw in a web page.

Please help, friends

EDIT: Thanks for the help. Here's the sample code if anybody needs it:

        Response.Clear();
        Response.ContentType = "image/jpeg";
        Byte[] isf = Convert.FromBase64String("AI8BHQS6AoQBAwRIEEU1CoABNofwCMeAU9BIREIpEoZCoJpCdyGDxCUYCi8ZicV3rFIRAILEchwGGx/MEQgkD1FBoIyBBoJAoFN53LY/EYPU4LAwh+sa6m2HwCLSacReHwGDatQ2Qy2f4PkMVhcB4FiSxWARSVbmiMHguyYfBYFdSESWNSSZTySRaQSqbUCjwYA="); // Sample
        ink.Load(isf);
        Byte[] imageData = ink.Save(PersistenceFormat.Gif);
        Response.BinaryWrite(imageData);
        Response.End();

Here's the image tag in the page to display it:

    <img alt="" src="RenderImage.aspx" />
도움이 되었습니까?

해결책

http://msdn.microsoft.com/en-us/library/aa515948.aspx

Is it possible that you serialize your ink object to this format? In this case you will just treat it as an image on your website, while still having an option of deserializating it into another instance of Ink class

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top