Add resize and scale support to create#999
Merged
MarkCallow merged 14 commits intomainfrom Mar 26, 2025
Merged
Conversation
Add matching origin checks to checkSpecsMatch.
A simplification that removes the need to avoid unnecessary fatal errors.
This completes the rewrite to prevent the target spec. being updated when subsequent files are loaded.
Scale and resize are now implemented and all existing tests pass. The only changes to the tests are for updated messages. No generated .ktx2 files have been changed.
Fix: do not update target spec on subsequent input file reads. Things were only working because no code after the ktxTexture2 is created was dependent on the values in the target image spec. Upcoming work needs those values.
…known. Add --levels to help. Improve error messages.
MarkCallow
added a commit
that referenced
this pull request
Mar 26, 2025
Missing functionality from the legacy tool added so we can comfortably remove the legacy tools in 4.5. The following issues were discovered and fixed while adding the features: * The target imageSpec was being updated for every input file. This was only working because, until now, nothing had looked at the spec values that were being changed once the texture had been created. The fix is to make separate determineSourceColorSpace and determineTargetColorSpace functions. * An associated fix to the above is to move the checks for non-null transferFunctions to the use site with fatal errors thrown then if they are null. This avoids the need for second guessing to avoid the fatal errors when the transferFunctions will not be used. With this and the above fix, the code is now much more robust and clear. * Full help was missing --levels. * Full help had an incorrect statement regarding implicit color conversions dating from the transfer function work.
richgel999
pushed a commit
to BinomialLLC/KTX-Software-Binomial-Fork
that referenced
this pull request
Mar 9, 2026
Missing functionality from the legacy tool added so we can comfortably remove the legacy tools in 4.5. The following issues were discovered and fixed while adding the features: * The target imageSpec was being updated for every input file. This was only working because, until now, nothing had looked at the spec values that were being changed once the texture had been created. The fix is to make separate determineSourceColorSpace and determineTargetColorSpace functions. * An associated fix to the above is to move the checks for non-null transferFunctions to the use site with fatal errors thrown then if they are null. This avoids the need for second guessing to avoid the fatal errors when the transferFunctions will not be used. With this and the above fix, the code is now much more robust and clear. * Full help was missing --levels. * Full help had an incorrect statement regarding implicit color conversions dating from the transfer function work.
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.
Missing functionality from the legacy tool added so we can comfortably remove the legacy tools in 4.5.
The following issues were discovered and fixed while adding the features:
determineSourceColorSpaceanddetermineTargetColorSpacefunctions.--levels.