KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
874 stars 229 forks source link

PNG: Paletted images not supported #253

Closed zeux closed 4 years ago

zeux commented 4 years ago

I'm getting this error on CesiumLogoFlat.png (a different file from #252...) from glTF-Sample-Models repository:

https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxTexturedNonPowerOfTwo/glTF

When trying to convert .png to .ktx2 using toktx. This makes it difficult to use toktx in glTF workflows; note that basisu can convert this file (to .basis) just fine.

MarkCallow commented 4 years ago

I did this because KTX v2 does not support any paletted formats. Are you happy for the colors to be expanded under the covers and end up with a much larger than original image, pre BasisU encoding of course.

I'll be happy to accept a PR to add the expansion.

zeux commented 4 years ago

Are you happy for the colors to be expanded under the covers and end up with a much larger than original image

Yes, I don't think the size of the image is very important as it's going to be reencoded anyway.