Possible Duplicate:
How do I save a stream to a file?
I have got a stream object which may be an image or file (msword, pdf), I have decided to handle both types very differently, as I may want to optimize/ compress / resize / produce thumbnails etc. I call a specific method to save an image to disk, the code:
var file = StreamObject;
//if content-type == jpeg, png, bmp do...
Image _image = Image.FromStream(file);
_image.Save(path);
//if pdf, word do...
How do I actually save word and pdfs?
//multimedia/ video?
I have looked (not hard enough probably) but I could not find it anywhere...