BT

InfoQ Homepage News Julie Lerman on Converting Silverlight InkPresenter Images to PNG files

Julie Lerman on Converting Silverlight InkPresenter Images to PNG files

Bookmarks

Julie Lerman, with the help of Stefan Wick, demonstrates how to convert Silverlight InkPresenter images into PNG files.

InkPresenter allows Silverlight applications to leverage the Ink technology found mainly in Tablet PCs. Using a stylus, or alternately a mouse, users can draw on the canvas without the developer needing to directly deal with tracking events. In short, it is a very simple graphics editor meant to be embedded as a user control.

Uses of it in Silverlight would include capturing signatures or allowing users to enter freehand text and drawings. Converting it from the proprietary Ink format to an image format like PNG does require a few tricks and a call to the server.

Since Silverlight is rather limited, Julie does the conversion on the server. First she converts the Ink image to XAML code. This is done passed to the server using a web service call. Once on the server, she turns it into a WPF InkObject. Finally, with the help of Stefan Wick, she offers code that converts the InkObject into a PNG file.

You can see the source code on Julie Lerman's blog.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.