UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FObjectThumbnail Class Reference

#include <ObjectThumbnail.h>

Public Member Functions

CORE_API FObjectThumbnail ()
 
int32 GetImageWidth () const
 
int32 GetImageHeight () const
 
int32 GetCompressedDataSize () const
 
void SetImageSize (int32 InWidth, int32 InHeight)
 
bool IsLoadedFromDisk (void) const
 
bool IsCreatedAfterCustomThumbsEnabled (void) const
 
void SetCreatedAfterCustomThumbsEnabled (void)
 
bool IsDirty () const
 
void MarkAsDirty ()
 
TArray< uint8 > & AccessImageData ()
 
const TArray< uint8 > & AccessImageData () const
 
TArray< uint8 > & AccessCompressedImageData ()
 
bool IsEmpty () const
 
bool HasValidImageData () const
 
CORE_API FThumbnailCompressionInterfaceGetCompressor () const
 
CORE_API FThumbnailCompressionInterfaceChooseNewCompressor () const
 
CORE_API const TArray< uint8 > & GetUncompressedImageData () const
 
FImageView GetImage () const
 
void SetImage (const FImageView &Image)
 
void SetImage (FImage &&Image)
 
CORE_API void Serialize (FArchive &Ar)
 
CORE_API void Serialize (FStructuredArchive::FSlot Slot)
 
CORE_API void CompressImageData ()
 
CORE_API void DecompressImageData ()
 
CORE_API void CountBytes (FArchive &Ar) const
 
CORE_API void CountImageBytes_Compressed (FArchive &Ar) const
 
CORE_API void CountImageBytes_Uncompressed (FArchive &Ar) const
 
bool operator== (const FObjectThumbnail &Other) const
 
bool operator!= (const FObjectThumbnail &Other) const
 

Static Public Member Functions

static void SetThumbnailCompressors (FThumbnailCompressionInterface *InPNGThumbnailCompressor, FThumbnailCompressionInterface *InJPEGThumbnailCompressor)
 

Friends

FArchiveoperator<< (FArchive &Ar, FObjectThumbnail &Thumb)
 
FArchiveoperator<< (FArchive &Ar, const FObjectThumbnail &Thumb)
 

Detailed Description

Thumbnail image data for an object.

Constructor & Destructor Documentation

◆ FObjectThumbnail()

FObjectThumbnail::FObjectThumbnail ( )

Default constructor.

Member Function Documentation

◆ AccessCompressedImageData()

TArray< uint8 > & FObjectThumbnail::AccessCompressedImageData ( )
inline

Access the compressed image data.

◆ AccessImageData() [1/2]

TArray< uint8 > & FObjectThumbnail::AccessImageData ( )
inline

Access the image data in place (does not decompress).

◆ AccessImageData() [2/2]

const TArray< uint8 > & FObjectThumbnail::AccessImageData ( ) const
inline

Access the image data in place (does not decompress) const version.

◆ ChooseNewCompressor()

FThumbnailCompressionInterface * FObjectThumbnail::ChooseNewCompressor ( ) const

Returns thumbnail compressor that would be used on current uncompressed image data.

◆ CompressImageData()

void FObjectThumbnail::CompressImageData ( )

Compress image data.

◆ CountBytes()

void FObjectThumbnail::CountBytes ( FArchive Ar) const

Calculates the memory usage of this FObjectThumbnail.

Parameters
Arthe FArchiveCountMem (or similar) archive that will store the results of the memory usage calculation.

◆ CountImageBytes_Compressed()

void FObjectThumbnail::CountImageBytes_Compressed ( FArchive Ar) const

Calculates the amount of memory used by the compressed bytes array.

Parameters
Arthe FArchiveCountMem (or similar) archive that will store the results of the memory usage calculation.

◆ CountImageBytes_Uncompressed()

void FObjectThumbnail::CountImageBytes_Uncompressed ( FArchive Ar) const

Calculates the amount of memory used by the uncompressed bytes array.

Parameters
Arthe FArchiveCountMem (or similar) archive that will store the results of the memory usage calculation.

◆ DecompressImageData()

void FObjectThumbnail::DecompressImageData ( )

Decompress image data.

◆ GetCompressedDataSize()

int32 FObjectThumbnail::GetCompressedDataSize ( ) const
inline
Returns
the number of bytes in this thumbnail's compressed image data.

◆ GetCompressor()

FThumbnailCompressionInterface * FObjectThumbnail::GetCompressor ( ) const

Returns thumbnail compressor used on current compressed image data.

◆ GetImage()

FImageView FObjectThumbnail::GetImage ( ) const
inline

Returns uncompressed image data as an FImageView, decompressing it on demand if needed.

Note the FImageView does not have a copy of the data, it points at the Thumbnail UncompressedImageData. If the UncompressedImageData is freed or changed, the FImageView will be affected.

Not actually a const function, may change the "ImageData" member.

◆ GetImageHeight()

int32 FObjectThumbnail::GetImageHeight ( ) const
inline

Returns the height of the thumbnail.

◆ GetImageWidth()

int32 FObjectThumbnail::GetImageWidth ( ) const
inline

Returns the width of the thumbnail.

◆ GetUncompressedImageData()

const TArray< uint8 > & FObjectThumbnail::GetUncompressedImageData ( ) const

Returns uncompressed image data, decompressing it on demand if needed.

Prefer GetImage and use FImage/FImageView for image data.

Not actually a const function, may change the "ImageData" member.

◆ HasValidImageData()

bool FObjectThumbnail::HasValidImageData ( ) const
inline

Returns if the thumbnail actually has any valid image data or not. Note that it is possible for IsEmpty to return true and this method to return false if there was a problem during serialization or the thumbnail data has otherwise become corrupted.

◆ IsCreatedAfterCustomThumbsEnabled()

bool FObjectThumbnail::IsCreatedAfterCustomThumbsEnabled ( void  ) const
inline

Returns true if the thumbnail was saved AFTER custom-thumbnails for shared thumbnail asset types was supported.

◆ IsDirty()

bool FObjectThumbnail::IsDirty ( ) const
inline

Returns true if the thumbnail is dirty and needs to be regenerated at some point.

◆ IsEmpty()

bool FObjectThumbnail::IsEmpty ( ) const
inline

Returns true if this is an empty thumbnail.

◆ IsLoadedFromDisk()

bool FObjectThumbnail::IsLoadedFromDisk ( void  ) const
inline

Returns true if the thumbnail was loaded from disk and not dynamically generated.

◆ MarkAsDirty()

void FObjectThumbnail::MarkAsDirty ( )
inline

Marks the thumbnail as dirty.

◆ operator!=()

bool FObjectThumbnail::operator!= ( const FObjectThumbnail Other) const
inline

◆ operator==()

bool FObjectThumbnail::operator== ( const FObjectThumbnail Other) const
inline

Comparison operator

◆ Serialize() [1/2]

void FObjectThumbnail::Serialize ( FArchive Ar)

Serializers

◆ Serialize() [2/2]

void FObjectThumbnail::Serialize ( FStructuredArchive::FSlot  Slot)

◆ SetCreatedAfterCustomThumbsEnabled()

void FObjectThumbnail::SetCreatedAfterCustomThumbsEnabled ( void  )
inline

For newly generated custom thumbnails, mark it as valid in the future.

◆ SetImage() [1/2]

void FObjectThumbnail::SetImage ( const FImageView Image)
inline

Copy Image into Thumbnail uncompressed image data. Existing compressed data, if any, is freed.

Thumbnails are always BGRA8-sRGB. The passed in Image can be other formats and conversion will be done if needed.

◆ SetImage() [2/2]

void FObjectThumbnail::SetImage ( FImage &&  Image)
inline

Move Image data into Thumbnail (convert to BGRA8-SRGB if necessary)

◆ SetImageSize()

void FObjectThumbnail::SetImageSize ( int32  InWidth,
int32  InHeight 
)
inline

Sets the image dimensions.

◆ SetThumbnailCompressors()

static void FObjectThumbnail::SetThumbnailCompressors ( FThumbnailCompressionInterface InPNGThumbnailCompressor,
FThumbnailCompressionInterface InJPEGThumbnailCompressor 
)
inlinestatic

Static: Sets the thumbnail compressor to use when loading/saving packages. The caller is responsible for the object's lifespan.

Parameters
InThumbnailCompressorA class derived from FThumbnailCompressionInterface.

Friends And Related Symbol Documentation

◆ operator<< [1/2]

FArchive & operator<< ( FArchive Ar,
const FObjectThumbnail Thumb 
)
friend

◆ operator<< [2/2]

FArchive & operator<< ( FArchive Ar,
FObjectThumbnail Thumb 
)
friend

I/O operator


The documentation for this class was generated from the following files: