How to access the compressed texture data at runtime?

Hi,

How to read the raw data from the compressed texture2d at runtime?

How to uncompress texture2d?
e.g:compression settings == normal map( bc5),bc1…

you would lock the various mips (e.g. mip 0) and read the data

https://forums.unrealengine.com/development-discussion/c-gameplay-programming/84701-reading-data-from-utexture2d

Yes, I know to lock the mip can access the texture data.
But the accessed data is compressed, it cant save as an image file(e.g: png file).
So my problem is how to uncompress the texture data.

If you want to save the texture, try this method
UImageWriteBlueprintLibrary::ExportToDisk(texture, ThePath, FOptions);

I can’t find the UImageWriteBlueprintLibrary::ExportToDisk(texture, ThePath, FOptions);

My engine version is 4.20, can you tell me I should find which file?

I tried to download the ImageWriteQueue from engine version 4.23.
But the ImageWriteQueue cant decompresses the image format of DXTn and BCn.
It just support PF_R8G8B8A8: PF_B8G8R8A8: