Add flipY option to StbImageLoader public API#2758
Merged
riccardobl merged 4 commits intomasterfrom May 10, 2026
Merged
Conversation
…tmapFontLayout" Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/ecd90ba7-f7da-4527-8100-c0bdbf4b65ab Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/ecd90ba7-f7da-4527-8100-c0bdbf4b65ab Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add a flipY option to StbImageLoader.load method
Add flipY option to StbImageLoader public API
May 9, 2026
riccardobl
requested changes
May 9, 2026
|
|
||
| AWTLoader loader = new AWTLoader(); | ||
| Image output = loader.load(scaled, false); | ||
| StbImageLoader loader = new StbImageLoader(); |
Member
There was a problem hiding this comment.
Revert this, just keep using AWTLoader since this class is already using AWT everywhere
Contributor
Author
There was a problem hiding this comment.
Reverted in 09d0764. MipMapGenerator.java is back to using AWTLoader.
|
|
||
| BufferedImage current = original; | ||
| AWTLoader loader = new AWTLoader(); | ||
| StbImageLoader loader = new StbImageLoader(); |
| converted = loader.load(new ByteArrayInputStream(baos.toByteArray()), false); | ||
| } catch (IOException e) { | ||
| throw new RuntimeException("Failed to convert image for mipmap level " + level, e); | ||
| } |
Member
There was a problem hiding this comment.
Revert this, keep using AWTLoader, since this class is already using awt everywhere
Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/6069a6e1-4ac9-47f2-a2c5-356b19b5f9c1 Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
riccardobl
approved these changes
May 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
StbImageLoaderlacked the publicload(InputStream, boolean flipY)andload(byte[], boolean flipY)methods thatAWTLoaderexposed, blocking full deprecation ofAWTLoader.Changes
StbImageLoader(jme3-plugins)public Image load(InputStream in, boolean flipY)andpublic Image load(byte[] data, boolean flipY)— core implementation delegates to STB's native flip support already used internallyload(AssetInfo)to delegate toload(InputStream, boolean)to eliminate duplicationTestBitmapFontLayout(jme3-examples)AWTLoaderwithStbImageLoader, convertingBufferedImageto PNG bytes viaImageIO.write()before passing to the loader