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
Post a Comment