c# - IS it possible to save a Image to Remote computer folder using windows service? -


i have byte array of image in local computer, using windows service want convert image , save in server folder know ip address of server of have tried this

byte[] photo = publicdata.photography;                                            memorystream ms = new memorystream(photo, 0, photo.length); ms.position = 0; ms.write(photo, 0, photo.length); system.drawing.image image = system.drawing.image.fromstream(ms, true);// line giving exception parameter not valid image.save(172.16.16.32/e/xyz); 

if have bytes, why bother streams , image obejcts?

byte[] photo = publicdata.photography;                                            var path = @"\\172.16.16.32\e\xyz\file.jpg";  file.writeallbytes(path, photo); 

Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -