function getOrigin(image) {
  try {
    return image.getOrigin().slice(0, 2);
  } catch {
    return [0, image.getHeight()];
  }
}
Get the origin of an image.  If the image does not have an affine transform,
the top-left corner of the pixel bounds is returned.
@param {GeoTIFFImage} image The image.
@return {Array<number>} The image origin.