Git Product home page Git Product logo

Comments (3)

MarkCallow avatar MarkCallow commented on June 19, 2024

I don't know anything about C#. Has somebody made libktx bindings for it?

Look at the first example in the libktx documentation. That shows you how to get the image data after loading a file and is suitable when there are only a few images in the KTX file. If the file has many images, you may want to use ktxTexture_IterateLevels or ktxTextureIterateLevelFaces

The linked documentation is for the V3 c API, that is the code currently in master. The API of the code in the ktx2 branch is similar but not exactly the same. I'm afraid the documentation still hasn't been updated.

from ktx-software.

Jakvic avatar Jakvic commented on June 19, 2024

thank you very much, I wrote "PVRTexToolCLI.exe -i SrcFileName.ktx -f r8g8b8a8 -d OutputFileName.png" in a bat file, and ran it in C#,it works.
https://stackoverflow.com/questions/42019495/convert-ktx-to-png-with-alpha-channel

from ktx-software.

MarkCallow avatar MarkCallow commented on June 19, 2024

I'm glad you found a solution. If the encoding and decoding of the PNG turns out to be too slow for you, you can look at example I suggested.

from ktx-software.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.