Modified stream to encode image to buffer

Just need to implement code so it passes buffer to client when asked for. Client can then write the image file to display it