code: function getSourceCanvasFromInput (input) {
    // input can be url, img, canvas or file
    return Promise.resolve().then(function () {
      if (typeof input === 'string') {
        // infoCallback('Loading image '+file.name)
        return fetchImage(input)
      } else if (input instanceof Blob) {
        // infoCallback('Reading image '+file.name)
        return getImageFromFile(input)
      } else {
        return input
      }
    }).then(function (canvas) {
      // infoCallback(file.name + ' - Generating source texture file')
      // return canvas
      return scaleDownImage(canvas, {
        powerOfTwo: false,
        maxWidth: 2048,
        maxHeight: 2048
      })
    })
  }
docs: private methods