Hi,
there is a possibility to export a texture to an external file like PNG or JPG from C++ code?
thanks,
Gabor
Hi,
there is a possibility to export a texture to an external file like PNG or JPG from C++ code?
thanks,
Gabor
I found some exporter classes like UTextureExporterBMP, but I cant build (unresolved external), seems it is usable only by editor?
this seems to work, solved
where tex is your UTexture*
FString FileName = FPaths::GameDir() + L"newmap.tga";
UTextureExporterTGA* TGAExporter;
TGAExporter = ConstructObject<UTextureExporterTGA>(UTextureExporterTGA::StaticClass());
int32 st = UExporter::ExportToFile(tex, TGAExporter, *FileName, false);