title: How to use roslibjs with topics of type sensor_msgs/Image to display image
body: <p>I am using roslibjs to display information from ROS in the browser. One of the topics I am subscribing to has the type <code>sensor_msgs/Image</code>, and I would like to display the image in the browser. For example, I receive this message for an image that is 1 red pixel:</p>
  
  <pre><code>{
  "encoding":"bgr8",
  "height":1,
  "header":{
      "stamp":{
          "secs":1394210281,
          "nsecs":406450571
          },
      "frame_id":"image",
      "seq":1
      },
  "step":3,
  "data":"AAD+",
  "width":1,
  "is_bigendian":0
  }
  </code></pre>
  
  <p>I want to turn this data into a base64 encoded image, so I can display the image as so:</p>
  
  <pre><code>&lt;img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXY/jPwAAAAwEBAGMkVdMAAAAASUVORK5CYII="&gt;
  </code></pre>
  
  <p>Does anyone know how (with javascript) I can use the ROS message to ultimately create a base64 encoded png?</p>