code: @SuppressWarnings("null")
    protected final @Nullable Integer getMediaRotation(@NotNull MediaRequest mediaRequest,
        @NotNull MediaHandlerConfig mediaHandlerConfig) {
      if (mediaRequest.getResource() != null) {
        String rotationProperty = getMediaRotationProperty(mediaRequest, mediaHandlerConfig);
        String stringValue = mediaRequest.getResource().getValueMap().get(rotationProperty, String.class);
        if (StringUtils.isNotEmpty(stringValue)) {
          int rotationValue = NumberUtils.toInt(stringValue);
          if (TransformedRenditionHandler.isValidRotation(rotationValue)) {
            return rotationValue;
          }
        }
      }
      return null;
    }
docs: Get (optional) rotation from resource
  @param mediaRequest Media request
  @param mediaHandlerConfig Media handler config
  @return Rotation value or null if not set or invalid