From 67e1822a06a30480eef06c8d79c78afb3dcaf695 Mon Sep 17 00:00:00 2001 From: Stefan Hahmann Date: Thu, 21 Aug 2025 14:44:51 +0200 Subject: [PATCH] Add limitations section to README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 3d6c8fd..e66916f 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,14 @@ try (Service python : env.python()) { // Wrap the NDArray to an Img. Img blurredImg = new ShmImg<>(blurred); +## Limitations + +The current maximum size of an image that can be backed by an `ShmImg` is `2^31 - 1` bytes, + +i.e. `ShmImg.copyOf( ArrayImgs.unsignedShorts( 1024, 1024, 1023 ) );` is possible, + +while `ShmImg.copyOf( ArrayImgs.unsignedShorts( 1024, 1024, 1024 ) );` leads to an Exception. + // Now do whatever you want with `blurredImg` as usual. // ... }