This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 0adfa9ce8081a23fc400a109c86f26bf4126617c Author: jsorel <[email protected]> AuthorDate: Tue Jun 2 15:53:58 2026 +0200 feat(GeoHeif): support signed integer component, added in ISO:23001-17 amendment 2 --- .../main/org/apache/sis/storage/isobmff/mpeg/Component.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/mpeg/Component.java b/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/mpeg/Component.java index 0abf1ec19d..412b230aa4 100644 --- a/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/mpeg/Component.java +++ b/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/mpeg/Component.java @@ -72,6 +72,7 @@ public final class Component extends TreeNode { * <li>0: unsigned integer coded on {@link #bitDepth} bits.</li> * <li>1: IEEE 754 floating point coded on {@link #bitDepth} bits: 16, 32, 64, 128 or 256.</li> * <li>2: complex number where the real and imaginary parts are coded on {@link #bitDepth} bits each.</li> + * <li>3: signed integer coded on {@link #bitDepth} bits. Added in ISO/IEC 23001-17:2024/Amd 2:2025</li> * </ul> * * Other values are reserved by ISO/IEC for future definitions. @@ -128,12 +129,14 @@ public final class Component extends TreeNode { * @throws RasterFormatException if the {@link #format} value is unsupported. */ public DataType getDataType() { + boolean signed = false; boolean real = false; switch (format) { case 0: break; case 1: real = true; break; + case 3: signed = true; break; default: throw new RasterFormatException(Errors.format(Errors.Keys.UnsupportedFormat_1, format)); } - return DataType.forNumberOfBits(Short.toUnsignedInt(bitDepth), real, false); + return DataType.forNumberOfBits(Short.toUnsignedInt(bitDepth), real, signed); } }
