Skip to content

GITC-7383: Fixed JPEG driver issue, updated maintainer information #52

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

Merged
merged 2 commits into from
Jun 23, 2025

Conversation

jackiryan
Copy link
Collaborator

@jackiryan jackiryan commented Jun 23, 2025

Description

Main fix for the point release 2.4.1, this fixes a regression introduced in 2.4.0 where single-banded input granules could not be converted to JPEG. This is because JPEG images do not support color palettes or transparency, so we need to rasterize the data before conversion like we were doing before. I also updated the maintainer information since Mauricio and I will be maintaining the code from now on.

Jira Issue ID

GITC-7383

Local Test Steps

PR Acceptance Checklist

  • Jira ticket acceptance criteria met.
  • CHANGELOG.md updated to include high level summary of PR changes.
  • docker/service_version.txt updated if publishing a release.
  • Tests added/updated and passing.
  • Documentation updated (if needed).

@jackiryan jackiryan requested a review from jtroberts June 23, 2025 21:11
@jackiryan
Copy link
Collaborator Author

For the record, I am having a chicken and egg problem understanding the workflow for testing this version with the regression test notebook. As far as I can tell, even a locally deployed harmony needs to be pointed to a version of hybig and other services deployed in SIT or UAT, so I don't think I can do the regression tests until I deploy this version in SIT/UAT.

return scale_paletted_1band_to_rgb(data_array, color_palette)


def scale_grey_1band_to_rgb(data_array: DataArray) -> tuple[ndarray, None]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 3 bands really needed? It looks like the same grey data is being copied into 3 bands. Couldn't we just return a single grey band?

Copy link
Collaborator Author

@jackiryan jackiryan Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent, yes. A greyscale JPEG can be a raster with three bands all the same color level. It can also be a single-banded image, but I prefer to keep it simple. The compression algorithm deals with it.

@jackiryan jackiryan merged commit 701fdb9 into main Jun 23, 2025
7 checks passed
@jackiryan jackiryan deleted the GITC-7383 branch June 23, 2025 23:10
@flamingbear
Copy link
Member

flamingbear commented Jun 24, 2025

@jackiryan

As far as I can tell, even a locally deployed harmony needs to be pointed to a version of hybig and other services deployed in SIT or UAT, so I don't think I can do the regression tests until I deploy this version in SIT/UAT.

That's not actually true I don't think. If you Have Harmony-In-A-Box and are running commands locally (localhost:3000), the CMR requests will go through UAT, but the processing will all happen locally in your k8s cluster. You can run the regression tests locally as well, just not in docker. You have to create the regression python environ, run jupyter lab, and in the browser run the regression notebook, pointing the harmony_host_url to http://localhost:3000 and it will run against your deployed hybig image.

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.

3 participants