Add JPEG 2000 support

JPEG 2000 support using OpenJPEG library.

- Add read/write support to JP2/J2K format for Gray/RGB(A)/CMYK images @8/16-bits
- Read test case images generated by Photoshop

The plugin has the following limitations:
- Resolution is not set (JP2_RES box is marked "For the future" in jp2.h)
- Metadata are not set (as with resolution)

Closes #13
This commit is contained in:
Mirco Miranda
2025-01-05 10:36:21 +00:00
committed by Albert Astals Cid
parent e6a0f8758b
commit c97ee00f5e
61 changed files with 962 additions and 2 deletions

View File

@ -119,6 +119,18 @@ if (LibHeif_FOUND)
endif()
endif()
if (OpenJPEG_FOUND)
kimageformats_read_tests(
jp2
)
# CMYK writing is incorrect in versions before 2.5.3
if ("${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}" VERSION_GREATER_EQUAL "2.5.3")
kimageformats_write_tests(
jp2-nodatacheck-lossless
)
endif()
endif()
if (LibJXL_FOUND AND LibJXLThreads_FOUND)
kimageformats_read_tests(
jxl