private static @Nullable Dimension getDimensionFromOriginal(@NotNull Rendition rendition) {
    Asset asset = rendition.getAsset();
    // asset may have stored dimension in different property names
    long width = getAssetMetadataValueAsLong(asset, TIFF_IMAGEWIDTH, EXIF_PIXELXDIMENSION);
    long height = getAssetMetadataValueAsLong(asset, TIFF_IMAGELENGTH, EXIF_PIXELYDIMENSION);
    return toDimension(width, height);
  }
private static @ Nullable Dimension getDimensionFromOriginal ( @ NotNull Rendition rendition ) { Asset asset = rendition . getAsset ( ) ; long width = getAssetMetadataValueAsLong ( asset , TIFF_IMAGEWIDTH , EXIF_PIXELXDIMENSION ) ; long height = getAssetMetadataValueAsLong ( asset , TIFF_IMAGELENGTH , EXIF_PIXELYDIMENSION ) ; return toDimension ( width , height ) ; }
Read dimension for original rendition from asset metadata.
@param rendition Rendition
@return Dimension or null