Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix to issue #336 rm ref to jasper, openjpeg, png #365

Merged
merged 7 commits into from
Mar 31, 2025

Conversation

webisu
Copy link
Collaborator

@webisu webisu commented Mar 20, 2025

Fixes #336

The png and jpeg2000 libaries are called by g2c. So wgrib2's CMakeLists.txt should not contain references to pnglib, Jasper or OpenJPEG. So

USE_PNG becomes USE_G2CLIB_LOW and G2_PNG_ENABLED == 1 (in grib2.h)

g2clib can be compile with either Jasper or OpenJPEG and the wgrib2 code is the same.
(use_jpeg2000) becaome USE_G2CLIB_LOW and G2_JPEG2000_ENABLED == 1 (in grib2.h)

USE_G2CLIB originally was to allow the use of the high level g2c grid decoder but had been
changed to "link in g2clib".

Original USE_G2CLIB becomes USE_G2CLIB_HIGH
(enables the use of the option -g2clib 2)

Notes: Config.c has to be changed to reflect that g2c is the source of png and jpeg2000 drivers.
The tests/CMakeLists.txt is different because you don't know the capabilities of g2c (png?, jpeg2000?)
until you run the make step. So the tests for png, jpeg2000 and aec support are determined at
run time. The test for aec was changed because eventually wgrib2 should use the g2c aec driver.

@webisu webisu requested a review from AlysonStahl-NOAA March 20, 2025 21:55
@AlysonStahl-NOAA
Copy link
Collaborator

This will also change some things in the workflows so if anything is broken we won't know since PNG/Jasper/etc are now disabled. I went ahead and updated the workflows myself in a separate pull request. Once those changes are merged and the updated tests pass here I can merge this one

@AlysonStahl-NOAA AlysonStahl-NOAA merged commit 64bb007 into develop Mar 31, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove reference to openjpeg, jasper and png libraries
2 participants