-
Notifications
You must be signed in to change notification settings - Fork 235
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
Issue with the usage of the --format parameter (v4.3.0-alpha3) #734
Comments
I stumbled upon #726 by accident and thought of a possible workaround for my problem. Instead of using a single command line, I can write four separate lines like this:
If the number of channels exceeds the expected count, the program will terminate, and I will obtain the desired file as a result. This solution may appear quite hacky and not very elegant. (-: |
The legacy I'm glad you found a solution. Sorry it is not elegant.
I don't understand this sentence. ktx create --format R8G8B8A8_SRGB --encode basis-lz --clevel 5 --qlevel 255 <input file> <output_ktx2 file> || \
ktx create --format R8G8B8_SRGB --encode basis-lz --clevel 5 --qlevel 255 <input file> <output_ktx2 file> || \
ktx create --format R8G8_SRGB --encode basis-lz --clevel 5 --qlevel 255 <input file> <output_ktx2 file> || \
ktx create --format R8_SRGB --encode basis-lz --clevel 5 --qlevel 255 <input file> <output_ktx2 file> If the input has less than 4 channels, the first command will fail and the second command will be tried, etc. |
Dear Sir/Madam,
I hope this message finds you well. I am currently facing a challenge regarding the streaming conversion of files to the KTX2 format.
The issue I am encountering is that the input files have different extensions, such as JPG or PNG, and they may or may not have an alpha channel. Additionally, the input files can have either 8-bit or 16-bit depth. In some cases, the files may even be grayscale or grayscale with an alpha channel. Unfortunately, I do not have explicit information about the channels for each file.
When I use the following command for file compression, it works fine for most of my files:
ktx create --format R8G8B8A8_SRGB --encode basis-lz --clevel 5 --qlevel 255 <input file> <output_ktx2 file>
However, other files return an error and fail to convert because the format specified in the command does not match their characteristics.
Is there a way to automatically detect the channels in the files or omit specifying them entirely using the --format parameter? I am aiming to achieve maximum file compression with minimal loss of quality and reduced memory footprint for KTX2 conversion.
I apologize if I have overlooked this information in the documentation. I kindly request your assistance in helping me understand how to address this issue.
Thank you for your support, and I look forward to your response.
Best regards,
The text was updated successfully, but these errors were encountered: