It works fine, but I'd like to optimize its handling of DDS textures and I need your advice. Here's the current workflow:

1. PAK file

--> RawRead -->

2. ZIP buffer

--> DllCall zlib -->

3. DDS buffer

--> RawWrite -->

4. DDS file

--> imagick cmd -->

5. BMP file

--> Gdip -->

6. BMP buffer

--> Gdip draw -->

7. GUI

What I would like to do is get rid of steps 4 and 5. For this, I thought of 4 different ways:

Use gdiplus\GdipCreateBitmapFromDirectDrawSurface. This would be the absolute best option. However, I couldn't find a way to make it work, and the documentation is sparse. I don't even know if it's supposed to take DDS buffers as input...

Use a third-party dll for bitmap conversion. Perhaps one of these would get the job done: mwgfx.dll, CORE_RL_MagickCore_.dll or something from nvidia perhaps.

Use a browser (electron) in order to access its DDS renderer with compressedTexImage2D. I'm affraid this might get very bloaty.