CARLA
Loading...
Searching...
No Matches
ImageUtil Namespace Reference

Classes

struct  ReadImageDataContext

Typedefs

using ReadImageDataAsyncCallback
using ReadImageDataAsyncCallbackFColor
using ReadImageDataAsyncCallbackFLinearColor

Functions

bool DecodePixelsByFormat (const void *PixelData, int32 SourcePitch, FIntPoint Extent, EPixelFormat Format, FReadSurfaceDataFlags Flags, TArrayView< FColor > Out)
bool DecodePixelsByFormat (const void *PixelData, int32 SourcePitch, FIntPoint Extent, EPixelFormat Format, FReadSurfaceDataFlags Flags, TArrayView< FLinearColor > Out)
void FlushBatchedReadbacks ()
TUniquePtr< TImagePixelData< FColor > > ReadImageData (UTextureRenderTarget2D &RenderTarget)
bool ReadImageData (UTextureRenderTarget2D &RenderTarget, TArray64< FColor > &Out)
bool ReadImageData (UTextureRenderTarget2D &RenderTarget, TArray< FColor > &Out)
static void ReadImageDataAddToBatch (ReadImageDataContext &&Context)
bool ReadImageDataAsync (UTextureRenderTarget2D &RenderTarget, FRHIGPUReadbackPoolPtr Pool, ReadImageDataAsyncCallback &&Callback, bool bNonBlocking)
bool ReadImageDataAsync (UTextureRenderTarget2D &RenderTarget, ReadImageDataAsyncCallback &&Callback)
bool ReadImageDataAsyncFColor (UTextureRenderTarget2D &RenderTarget, ReadImageDataAsyncCallbackFColor &&Callback, bool bNonBlocking, FRHIGPUReadbackPoolPtr Pool)
bool ReadImageDataAsyncFLinearColor (UTextureRenderTarget2D &RenderTarget, ReadImageDataAsyncCallbackFLinearColor &&Callback, bool bNonBlocking, FRHIGPUReadbackPoolPtr Pool)
static void ReadImageDataBegin (ReadImageDataContext &Self, UTextureRenderTarget2D &RenderTarget, FRHIGPUReadbackPoolPtr Pool, ReadImageDataAsyncCallback &&Callback)
static void ReadImageDataEnd (ReadImageDataContext &Self)
static void ReadImageDataEndAsync (ReadImageDataContext &&Self)
bool ReadSensorImageDataAsync (AShaderBasedSensor &Sensor, ReadImageDataAsyncCallback &&Callback)
bool ReadSensorImageDataAsyncFColor (AShaderBasedSensor &Sensor, ReadImageDataAsyncCallbackFColor &&Callback)
bool ReadSensorImageDataAsyncFLinearColor (AShaderBasedSensor &Sensor, ReadImageDataAsyncCallbackFLinearColor &&Callback)
TFuture< bool > SaveImageData (TUniquePtr< TImagePixelData< FColor > > Data, const FStringView &Path)
TFuture< bool > SaveImageData (UTextureRenderTarget2D &RenderTarget, const FStringView &Path)

Variables

static TArray< ReadImageDataContext > GBatchedReadbacks

Typedef Documentation

◆ ReadImageDataAsyncCallback

Initial value:
std::function<
bool(
const void*,
size_t,
size_t,
EPixelFormat,
FIntPoint
)
>

Definition at line 26 of file ImageUtil.h.

◆ ReadImageDataAsyncCallbackFColor

Initial value:
std::function<
bool(
TArrayView<const FColor>,
FIntPoint
)
>

Definition at line 39 of file ImageUtil.h.

◆ ReadImageDataAsyncCallbackFLinearColor

Initial value:
std::function<
bool(
TArrayView<const FLinearColor>,
FIntPoint
)
>

Definition at line 49 of file ImageUtil.h.

Function Documentation

◆ DecodePixelsByFormat() [1/2]

bool ImageUtil::DecodePixelsByFormat ( const void * PixelData,
int32 SourcePitch,
FIntPoint Extent,
EPixelFormat Format,
FReadSurfaceDataFlags Flags,
TArrayView< FColor > Out )

Definition at line 59 of file ImageUtil.cpp.

References DecodePixelsByFormat().

◆ DecodePixelsByFormat() [2/2]

bool ImageUtil::DecodePixelsByFormat ( const void * PixelData,
int32 SourcePitch,
FIntPoint Extent,
EPixelFormat Format,
FReadSurfaceDataFlags Flags,
TArrayView< FLinearColor > Out )

◆ FlushBatchedReadbacks()

void ImageUtil::FlushBatchedReadbacks ( )

◆ ReadImageData() [1/3]

TUniquePtr< TImagePixelData< FColor > > ImageUtil::ReadImageData ( UTextureRenderTarget2D & RenderTarget)

Definition at line 172 of file ImageUtil.cpp.

References ReadImageData().

◆ ReadImageData() [2/3]

bool ImageUtil::ReadImageData ( UTextureRenderTarget2D & RenderTarget,
TArray64< FColor > & Out )

Definition at line 155 of file ImageUtil.cpp.

References ReadImageData().

◆ ReadImageData() [3/3]

bool ImageUtil::ReadImageData ( UTextureRenderTarget2D & RenderTarget,
TArray< FColor > & Out )

Definition at line 138 of file ImageUtil.cpp.

References ReadImageData().

Referenced by ReadImageData(), ReadImageData(), ReadImageData(), and SaveImageData().

◆ ReadImageDataAddToBatch()

void ImageUtil::ReadImageDataAddToBatch ( ReadImageDataContext && Context)
static

Definition at line 345 of file ImageUtil.cpp.

References GBatchedReadbacks, and ReadImageDataAddToBatch().

Referenced by ReadImageDataAddToBatch(), and ReadImageDataAsync().

◆ ReadImageDataAsync() [1/2]

◆ ReadImageDataAsync() [2/2]

bool ImageUtil::ReadImageDataAsync ( UTextureRenderTarget2D & RenderTarget,
ReadImageDataAsyncCallback && Callback )

Definition at line 464 of file ImageUtil.cpp.

References ReadImageDataAsync().

◆ ReadImageDataAsyncFColor()

◆ ReadImageDataAsyncFLinearColor()

bool ImageUtil::ReadImageDataAsyncFLinearColor ( UTextureRenderTarget2D & RenderTarget,
ReadImageDataAsyncCallbackFLinearColor && Callback,
bool bNonBlocking,
FRHIGPUReadbackPoolPtr Pool )

◆ ReadImageDataBegin()

◆ ReadImageDataEnd()

◆ ReadImageDataEndAsync()

void ImageUtil::ReadImageDataEndAsync ( ReadImageDataContext && Self)
static

Definition at line 297 of file ImageUtil.cpp.

References ReadImageDataEnd(), and ReadImageDataEndAsync().

Referenced by ReadImageDataAsync(), and ReadImageDataEndAsync().

◆ ReadSensorImageDataAsync()

◆ ReadSensorImageDataAsyncFColor()

◆ ReadSensorImageDataAsyncFLinearColor()

◆ SaveImageData() [1/2]

TFuture< bool > ImageUtil::SaveImageData ( TUniquePtr< TImagePixelData< FColor > > Data,
const FStringView & Path )

Definition at line 194 of file ImageUtil.cpp.

References SaveImageData().

◆ SaveImageData() [2/2]

TFuture< bool > ImageUtil::SaveImageData ( UTextureRenderTarget2D & RenderTarget,
const FStringView & Path )

Definition at line 185 of file ImageUtil.cpp.

References ReadImageData(), and SaveImageData().

Referenced by SaveImageData(), and SaveImageData().

Variable Documentation

◆ GBatchedReadbacks

TArray<ReadImageDataContext> ImageUtil::GBatchedReadbacks
static

Definition at line 343 of file ImageUtil.cpp.

Referenced by FlushBatchedReadbacks(), and ReadImageDataAddToBatch().