BT

Julie Lerman on Converting Silverlight InkPresenter Images to PNG files

| by Jonathan Allen Follow 576 Followers on Feb 04, 2008. Estimated reading time: less than one minute |

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 Stage
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.

Tell us what you think

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

Email me replies to any of my messages in this thread
Community comments

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT