code: private static @Nullable Dimension getDimensionFromRenditionMetadata(@NotNull Rendition rendition) {
      Asset asset = rendition.getAsset();
      String metadataPath = JCR_CONTENT + "/" + NN_RENDITIONS_METADATA + "/" + rendition.getName();
      Resource metadataResource = AdaptTo.notNull(asset, Resource.class).getChild(metadataPath);
      if (metadataResource != null) {
        ValueMap props = metadataResource.getValueMap();
        long width = props.get(PN_IMAGE_WIDTH, 0L);
        long height = props.get(PN_IMAGE_HEIGHT, 0L);
        return toDimension(width, height);
      }
      return null;
    }
docs: Read dimension for non-original rendition from renditions metadata generated by "DamRenditionMetadataService".
  @param rendition Rendition
  @return Dimension or null