BUG : fix encoding of png data

When formatting the png data to send over the wire need to decode the
byte string to ascii.  If this is not done the literal string sent
to the browser is:
   "data:image/png;base64,b'iVBOR...'"
instead of
   "data:image/png;base64,iVBOR..."

The extra b' makes the string no longer a valid png which is why
we were getting white boxes