docs: function (srcWidth, srcHeight, maxWidth, maxHeight, centerCrop) {
      var ratio = centerCrop ? Math.max(maxWidth / srcWidth, maxHeight / srcHeight) :
        Math.min(maxWidth / srcWidth, maxHeight / srcHeight);
      return {
        width: srcWidth * ratio, height: srcHeight * ratio,
        marginX: srcWidth * ratio - maxWidth, marginY: srcHeight * ratio - maxHeight
      };
    }