-
Notifications
You must be signed in to change notification settings - Fork 242
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
"ktx create" produces invalid file when using --generatemipmap flag #978
Comments
It looks like the validator is using only the byte length to determine level ordering and BasisLZ compression is resulting in level 11 being smaller than level 12. It is not entirely surprising as the actual data is in the global dictionaries in the supercompression global data. The level data is references to those dictionaries. @aqnuep I think this is one for you. For some reason your handle is no longer appearing in the list of possible assignees even though you still have write permission to the repo. |
We'll take a look at this. IIRC we should have had some special cases to deal with supercompressions so that we check the uncompressed byte lengths, but there could be some corner case here for BasisLZ that isn't handled as expected. |
@aqnuep please look at this soon. I am about to prepare the next release. |
I didn't forget about this, but I'm not sure when we'll get the change to deal with this. I'll try to give this one a priority. |
Steps to reproduce:
I have an 8k PNG texture, which I'd like to convert to KTX2 for use in a WebGL application.
This is the command I'm using:
ktx create --format R8G8B8_SRGB --generate-mipmap --assign-oetf srgb --encode basis-lz --clevel 2 --qlevel 128 earth_color_8K.png earth_color_8K.ktx2
After validation with
ktx validate earth_color_8k.ktx2
It says the following error:
Logging out the info with
ktx info
shows me this:I'm attaching the original PNG file here:
earth_color_8K_2.png.zip
And the generated KTX2 file here:
earth_color_8K_2.ktx2.zip
(Actually the original files were 16K resolution, but I resized the image so I can upload it here. The problem doesn't happen below 8K resolution with this image, as far as I tested (4k, 2k, 1k), and it doesn't happen with other 16k and 8k images, either...)
The text was updated successfully, but these errors were encountered: