Not an answer but as a pointer start looking at stream,which can both read and write and is the way of moving images around from one place to another in .net

a stream can both read and write and certainly have used them to load images so can see no reason why they can't be used the other way