0

I've created a drawing app in Silverlight that generates a png file from an InkPresenter control when the user hits a "Save" button. I used code from the following article to accomplish the png creation:

http://rongchaua.net/blog/windows-phone-signature-capturing-with-inkpresenter-and-save-to-png-file/

It all works great. However, the last step in the process is to save that png file into a varbinary(max) field in a database table. Does anyone know how to convert the saved png file into a format that is compatible with the varbinary(max) field?

0

1 Answer 1

1

I found a solution. First, I had to increase the max buffer size in my OData Service:

http://malvinly.com/2011/05/09/wcf-data-services-and-maxreceivedmessagesize/

Then, I found this code to convert a bitmap to a byte array:

Silverlight: image to byte[]

Had to do a few other things to tighten it up, but it's now working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.