code: @SuppressWarnings("null")
    protected final @Nullable CropDimension getMediaCropDimension(@NotNull MediaRequest mediaRequest,
        @Nullable MediaHandlerConfig mediaHandlerConfig) {
      if (mediaRequest.getResource() != null) {
        String cropProperty = getMediaCropProperty(mediaRequest, mediaHandlerConfig);
        String cropString = mediaRequest.getResource().getValueMap().get(cropProperty, String.class);
        if (StringUtils.isNotEmpty(cropString)) {
          try {
            return CropDimension.fromCropString(cropString);
          }
          catch (IllegalArgumentException ex) {
            // ignore
          }
        }
      }
      return null;
    }
docs: Get (optional) crop dimensions from resource
  @param mediaRequest Media request
  @param mediaHandlerConfig Media handler config (can be null, but should not be null)
  @return Crop dimension or null if not set or invalid