function getActualZoomingPosition(
  naturalWidth,
  naturalHeight,
  imageDisplayedInBrowserWidth,
  imageDisplayedInBrowserHeight,
  zoomingPositionX,
  zoomingPositionY,
) {
  // The zoomingPosition is actually relative to whatever size the image is
  // actually being displayed in the browser (which could be scaled down or up),
  // so turn it into a percentage then re-apply it to the full natural size to get the
  // correct upper-left pixel offsets.
  const zoomPercentageX = Math.abs(zoomingPositionX) / imageDisplayedInBrowserWidth;
  const zoomPercentageY = Math.abs(zoomingPositionY) / imageDisplayedInBrowserHeight;
  const viewportNaturalX = Math.floor(zoomPercentageX * naturalWidth);
  const viewportNaturalY = Math.floor(zoomPercentageY * naturalHeight);

  return [viewportNaturalX, viewportNaturalY];
}
Given some image that we might be zoomed into, get its x and y values relative to the actual,
natural size of the image.

@param {int} naturalWidth The actual size of the Image if it were loaded from disk and shown
 its full, real size.
@param {int} naturalHeight Same, but for the height.
@param imageDisplayedInBrowserWidth {int} When the image is displayed in an actual browser
 it can be shrunken or expanded based on its container and available screen real estate; this
 is that width.
@param imageDisplayedInBrowserHeight {int} Same, but for the height.
@param zoomingPositionX {float} If zoomed and panned away from the image origin at the upper
 left of the screen, relates negative float coordinates from that corner of the X value,
 where these coordinates are relative to the imageDisplayedInBrowserWidth values.
@param zoomingPositionY {float} Same, but for the height.
@returns {[int, int]} X and Y upper left position of where the zoom is relative to the actual,
 natural size of the image.