code: function(viewerX, viewerY) {
          if (viewerX instanceof $.Point) {
              //they passed a point instead of individual components
              return this.viewportToImageCoordinates(viewerX.x, viewerX.y);
          }
  
          if (this.viewer) {
              var count = this.viewer.world.getItemCount();
              if (count > 1) {
                  $.console.error('[Viewport.viewportToImageCoordinates] is not accurate ' +
                      'with multi-image; use TiledImage.viewportToImageCoordinates instead.');
              } else if (count === 1) {
                  // It is better to use TiledImage.viewportToImageCoordinates
                  // because this._contentBoundsNoRotate can not be relied on
                  // with clipping.
                  var item = this.viewer.world.getItemAt(0);
                  return item.viewportToImageCoordinates(viewerX, viewerY, true);
              }
          }
  
          return this._viewportToImageDelta(
              viewerX - this._contentBoundsNoRotate.x,
              viewerY - this._contentBoundsNoRotate.y);
      }
docs: Translates from OpenSeadragon viewer coordinate system to image coordinate system.
  This method can be called either by passing X,Y coordinates or an
  OpenSeadragon.Point
  Note: not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.
  @function
  @param {(OpenSeadragon.Point|Number)} viewerX either a point or the X
  coordinate in viewport coordinate system.
  @param {Number} [viewerY] Y coordinate in viewport coordinate system.
  @return {OpenSeadragon.Point} a point representing the coordinates in the image.