Changelog
- Updated DirectXTex to June 2024 release (#11)
It includes a fix for HDR codec to avoid buffer overread for some malformed files (microsoft/DirectXTex#471) - Added a new function
uninit_com()
to uninitialize COM. (#9, #10) texconv()
andtexassemble()
calluninit_com()
internally when you setinit_com=true
.
Note
Presumably v0.4.1 will work without any changes to your existing code, but if you use the init_com()
function, it is recommended that you call uninit_com()
every time init_com()
returns 0 or 1.
Example code for python
# init_com=True calls init_com() and uninit_com() internally.
result = dll.texconv(len(argv), argv, verbose=True, init_com=True, allow_slow_codec=False,
err_buf=err_buf, err_buf_size=512)
# You can also initialize COM by yourself.
initialized = dll.init_com()
if initialized == 0 or initialized == 1:
result = dll.texconv(len(argv), argv, verbose=True, init_com=False, allow_slow_codec=False,
err_buf=err_buf, err_buf_size=512)
dll.uninit_com()
else:
print("Failed to initialize COM.")