       binaryString[i] = String.fromCharCode(uInt8Array[i])
     bdata = binaryString.join('')
     base64 = window.btoa(bdata)
-    if data.width == 640 and data.height == 480
-      canvas.width = data.width
-      canvas.height = data.height
-    if data.width == 800 and data.height == 600
-      canvas.width = data.width
-      canvas.height = data.height
-    if data.width == 1280 and data.height == 720
-      canvas.width = data.width
-      canvas.height = data.height
-    switch data.width
-      when 640 then scale = 1.25
-      when 800 then scale = 1
-      when 1280 then scale = 0.625
-    switch data.height
-      when 600 then scale = 1
-      when 720 then scale = 1.11
     image.src = 'data:image/jpeg;base64,' + base64
 
     image.onload = ->

  ctx = canvas.getContext('2d')

  socket.on 'init', (data) ->
    canvas.width = data.width
    canvas.height = data.height
    $scope.vmIsRunning = true
    return


        return

      $scope.confirm = (os) ->
        if $scope.modifyOsForm.$valid
          $scope.modifyOs os
          $mdDialog.hide()
        return

      return
