I have this line of C++ code for UE5.2: TArray<uint8> imageData =…
- User
I have this line of C++ code for UE5.2:
TArray<uint8> imageData = nextRenderRequest->Image.GetData();. When compiling, I get this error:CameraCaptureManager.cpp:111:15: error: no viable conversion from 'TArray<FColor>::ElementType *' (aka 'FColor *') to 'TArray<uint8>' (aka 'TArray<unsigned char>'). Fix the line please. - Assistant
The error message states that there is no valid conversion from
FColor*toTArray<uint8>.FColoris a structure of 4uint8values (R, G, B, A). If you want to convertFColortoTArray<uint8>, you need to convert eachFColorto fouruint8values.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.