开发者

How can i convert WriteableBitmap to jpg or some other common format?

I have one application that allows user to do various things like rotating and scaling an image and finally when the user clicks on save, the image should get saved on the server. Everything works out fine but the problem is since I am directly saving the WriteableBitmap after converting it to bytearray usi开发者_运维技巧ng WriteableBitmapEx, the saved image is also WriteableBitmap and so I am not able to view it using common Picture Viewer.

I want my image to be saved as a JPEG. How can I do this?


Hey Ankit, here is a sample by John Papa that shows how to save WriteableBitmaps to PNG's.

http://johnpapa.net/silverlight/saving-snapshots-to-png-in-silverlight-4-and-the-webcam/

He uses two options: http://imagetools.codeplex.com/

And: http://blogs.msdn.com/b/jstegman/archive/2008/04/21/dynamic-image-generation-in-silverlight.aspx

I would suggest the ImageTools route.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜