We updated our project recently from 5.0.3 to 5.1.1 and we use a USceneCaptureComponent
to capture frames, very similar to this project here: GitHub - TimmHess/UnrealImageCapture: A small tutorial repository on capturing images with semantic annotation from UnrealEngine to disk.
using
static TSharedPtr<IImageWrapper> ImageWrapper = ImageWrapperModule.CreateImageWrapper(EImageFormat::PNG);
ImageWrapper->SetRaw(ImageData.GetData(), ImageData.GetAllocatedSize(), ImageWidth, ImageHeight, ERGBFormat::BGRA, 8);
const TArray64<uint8>& ImageDataCompressed = ImageWrapper->GetCompressed(1);
FFileHelper::SaveArrayToFile(ImageDataCompressed , *Path2Image);
in 5.0.3 for storing .pngs worked fine, now in 5.1.1 the images are black/transparent. The code of the used FPngImageWrapper has not changed apparently, but maybe the underlying png.h?
Has anyone encountered similar issues, and found a solution?