Comments (6)
I have tried modifying toktx
to use OpenImageIO for reading images. The large numbers of dependencies it has is proving intractable. I have had many issues getting all these packages to build via vcpkg (the only package manager I've found that supports what might be termed redistributable packages) for all the platforms we are supporting. Furthermore building the packages for a single platform in CI, when the builds work, takes 45 minutes or more. Because of these issues I've all but given up on OIIO. I hadn't got far enough to actually try any DDS files.
I had a brief discussion with the primary maintainer of OIIO and it isn't clear that OIIO's DDS reader lets the caller retrieve unmodified, still compressed (raw) image data. The OIIO API model is different. A reader would need special features to provide access to raw image data.
It probably would be relatively straightforward to integrate just a DDS reader into toktx
but import would be subject to whatever issues said reader has. If someone wishes to give this a try, contact me first to discuss. Before adding any more readers the way image reading is currently handled in toktx
needs restructuring to ease adding new input formats.
from ktx-software.
Yeah, I didn't meant to imply OIIO should be integrated into KTX-Software.
FWIW I never thought you were.
I'd be happy enough to see OIIO support something like DDS → RGBA32 (via OpenEXR or KTX2), then at least there is a lossless path to access the data.
If this is just to get access to the data in the DDS file, then okay. If you are going to encode it again in whatever format it started from, the decode-encode will introduce further noise into the image. If the intent is to convert a DDS file to a KTX file it is far better to copy the compressed bits from the DDS container into the new KTX2 container. I'm pretty sure all compressed formats available in DDS/D3D have Vulkan equivalents.
from ktx-software.
Contributions will be gratefully received.
from ktx-software.
Yes, DDS to KTX and KTX2 would be great. Does anyone know which tool can do this conversion? I've been looking for it
from ktx-software.
We (three.js) are interested in these workflows as well. OpenImageIO might be part of the solution — it can read:
bmp, cineon, dds, dpx, ffmpeg, fits, gif, hdr, heif, ico, iff, jpeg, null, openexr, png, pnm, psd, raw, rla,
sgi, socket, softimage, targa, tiff, webp, zfile
However, we've found OIIO's support for compressed DDS files and cubemaps to be ... less than complete (mrdoob/three.js#24189). But at least OIIO may be able to convert some DDS files to PNG or OpenEXR, which KTX-Software could then ingest.
If there are any other possibilities, we'd be glad to hear about them, and to stop maintaining support for DDS and PVR texture containers in favor of KTX2. 🙏
from ktx-software.
Because of these issues I've all but given up on OIIO. I hadn't got far enough to actually try any DDS files.
Yeah, I didn't meant to imply OIIO should be integrated into KTX-Software. Keeping dependencies light makes sense to me. More that (1) it'd be great to see OIIO with a KTX2 plugin someday, and (2) users can potentially use OIIO to convert files to something like OpenEXR, then use KTX-Software to convert to KTX2.
...it isn't clear that OIIO's DDS reader lets the caller retrieve unmodified, still compressed (raw) image data. The OIIO API model is different.
That's a useful point. I'd be happy enough to see OIIO support something like DDS → RGBA32 (via OpenEXR or KTX2), then at least there is a lossless path to access the data. I don't know that DDS really makes sense as an intermediate step in any production pipeline, it's more that we have users who just don't know how to get data out of these files at all.
from ktx-software.
Related Issues (20)
- Allow A8B8G8R8 PACK32 formats
- Loading KTX1 and KTX2 file on Linux/OpenGL 4.3 leads to weird error if not luch the program with sudo HOT 4
- Project install installs fmt lib HOT 1
- Preceding `ktx` command name with option leads to error HOT 1
- WebGL test gets shader compile error
- Converting transfer functions (using assign-oetf and convert-oetf) HOT 15
- samplePositions possibly incorrect for single-plane 4:2:2 YUV formats HOT 4
- The JNI binding for input swizzling is broken
- No option to apply `zstd`/`zlib` compression via JNI HOT 21
- Improvements for the Java/JNI bindings HOT 4
- Synchronizing auto-generated files with bindings HOT 2
- How to call `CreateFromMemory`? HOT 2
- Memoy leak when ktxTexture2_DeflateZstd fails
- Running in docker container (GLIBC not found error) HOT 2
- CI build scripts prevent local use with test updates by initializing CTS submodule
- Skipping mipmaps when loading from disk HOT 2
- The execution speed of the ktxTexture2_CompressBasisEx method is quite slow HOT 15
- No definition for ktxTexture2_Destroy in ktx.h HOT 3
- Enabling Automatic Mipmap Generation Causes Validation Error HOT 1
- ktxTexture_SetImageFromMemory should document pointer lifetime guarantees HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ktx-software.