Skip to content

Stb image loader#2718

Open
riccardobl wants to merge 5 commits intojMonkeyEngine:masterfrom
riccardobl:stb
Open

Stb image loader#2718
riccardobl wants to merge 5 commits intojMonkeyEngine:masterfrom
riccardobl:stb

Conversation

@riccardobl
Copy link
Copy Markdown
Member

@riccardobl riccardobl commented Apr 24, 2026

This PR replaces (and deprecates) AWTLoader, HDRLoader, TGALoader and the android native loader (except for webp, heic, heif), with a multiplatform java port of stb-image.

Based on : #2721

gemini-code-assist[bot]

This comment was marked as outdated.

@riccardobl
Copy link
Copy Markdown
Member Author

@gemini-code-assist do a new review

Comment thread jme3-android/src/main/resources/com/jme3/asset/Android.cfg Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

🖼️ Screenshot tests have failed.

The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests.

📄 Where to find the report:

⚠️ If you didn't expect to change anything visual:
Fix your changes so the screenshot tests pass.

If you did mean to change things:
Review the replacement images in jme3-screenshot-tests/build/changed-images to make sure they really are improvements and then replace and commit the replacement images at jme3-screenshot-tests/src/test/resources.

If you are creating entirely new tests:
Find the new images in jme3-screenshot-tests/build/changed-images and commit the new images at jme3-screenshot-tests/src/test/resources.

Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar".

See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information

Contact @richardTingle (aka richtea) for guidance if required

Comment thread jme3-core/src/main/resources/com/jme3/asset/General.cfg Outdated
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces StbImageLoader as a unified, cross-platform image loader using the stb-image library, leading to the deprecation of AWTLoader, HDRLoader, and TGALoader. It also adds support for R16F and RG16F formats in ImageCodec. Review feedback highlights a potential thread-safety issue with the shared StbImage instance, suggests marking 8-bit luminance formats as sRGB for consistency with previous loaders, and notes a minor formatting correction.

Comment thread jme3-plugins/src/main/java/com/jme3/texture/plugins/StbImageLoader.java Outdated
riccardobl and others added 3 commits April 24, 2026 18:21
…ader.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.

1 participant