Given a WriteableBitmap, how can I save the bitmap back into an image stream (JPG or BMP)?
My scenario is:
- Show OpenFileDialog, let user select image
- Load image into WriteableBitmap
- Resize image
- Send image stream to web service
Step #4 is what I'm having trouble with. How can I go from WriteableBitmap -> Stream?