Navigation
API > API/Runtime > API/Runtime/Core
Thumbnail image data for an object.
| Name | FObjectThumbnail |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/ObjectThumbnail.h |
| Include Path | #include "Misc/ObjectThumbnail.h" |
Syntax
class FObjectThumbnail
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FObjectThumbnail() |
Default constructor. | Misc/ObjectThumbnail.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| JPEGThumbnailCompressor | FThumbnailCompressionInterface * | Misc/ObjectThumbnail.h | |
| PNGThumbnailCompressor | FThumbnailCompressionInterface * | Static: Thumbnail compressor. |
Static: Thumbnail compressor | Misc/ObjectThumbnail.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCreatedAfterCustomThumbForSharedTypesEnabled | bool | Whether this was saved AFTER custom-thumbnails for shared thumbnail asset types was supported | Misc/ObjectThumbnail.h | |
| bIsDirty | bool | True if the thumbnail is dirty and should be regenerated at some point | Misc/ObjectThumbnail.h | |
| bIsJPEG | bool | Whether compressed data is JPEG (else PNG) | Misc/ObjectThumbnail.h | |
| bLoadedFromDisk | bool | Whether the thumbnail has a backup on disk | Misc/ObjectThumbnail.h | |
| CompressedImageData | TArray< uint8 > | Compressed image data (serialized) | Misc/ObjectThumbnail.h | |
| ImageData | TArray< uint8 > | Image data bytes | Misc/ObjectThumbnail.h | |
| ImageHeight | int32 | Thumbnail height (serialized) | Misc/ObjectThumbnail.h | |
| ImageWidth | int32 | Thumbnail width (serialized) | Misc/ObjectThumbnail.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TArray< uint8 > & AccessCompressedImageData() |
Access the compressed image data. | Misc/ObjectThumbnail.h | |
const TArray< uint8 > & AccessImageData () |
Access the image data in place (does not decompress) const version. | Misc/ObjectThumbnail.h | |
TArray< uint8 > & AccessImageData () |
Access the image data in place (does not decompress). | Misc/ObjectThumbnail.h | |
FThumbnailCompressionInterface * ChooseNewCompressor() |
Returns thumbnail compressor that would be used on current uncompressed image data. | Misc/ObjectThumbnail.h | |
void CompressImageData() |
Compress image data. | Misc/ObjectThumbnail.h | |
void CountBytes
(
FArchive& Ar |
Calculates the memory usage of this FObjectThumbnail. | Misc/ObjectThumbnail.h | |
void CountImageBytes_Compressed
(
FArchive& Ar |
Calculates the amount of memory used by the compressed bytes array. | Misc/ObjectThumbnail.h | |
void CountImageBytes_Uncompressed
(
FArchive& Ar |
Calculates the amount of memory used by the uncompressed bytes array. | Misc/ObjectThumbnail.h | |
void DecompressImageData() |
Decompress image data. | Misc/ObjectThumbnail.h | |
int32 GetCompressedDataSize() |
Misc/ObjectThumbnail.h | ||
FThumbnailCompressionInterface * GetCompressor() |
Returns thumbnail compressor used on current compressed image data. | Misc/ObjectThumbnail.h | |
FImageView GetImage () |
Returns uncompressed image data as an FImageView, decompressing it on demand if needed. | Misc/ObjectThumbnail.h | |
int32 GetImageHeight() |
Returns the height of the thumbnail. | Misc/ObjectThumbnail.h | |
int32 GetImageWidth() |
Returns the width of the thumbnail. | Misc/ObjectThumbnail.h | |
const TArray< uint8 > & GetUncompressedImageData () |
Returns uncompressed image data, decompressing it on demand if needed. | Misc/ObjectThumbnail.h | |
bool HasValidImageData () |
Returns if the thumbnail actually has any valid image data or not. | Misc/ObjectThumbnail.h | |
bool IsCreatedAfterCustomThumbsEnabled() |
Returns true if the thumbnail was saved AFTER custom-thumbnails for shared thumbnail asset types was supported. | Misc/ObjectThumbnail.h | |
bool IsDirty() |
Returns true if the thumbnail is dirty and needs to be regenerated at some point. | Misc/ObjectThumbnail.h | |
bool IsEmpty() |
Returns true if this is an empty thumbnail. | Misc/ObjectThumbnail.h | |
bool IsLoadedFromDisk() |
Returns true if the thumbnail was loaded from disk and not dynamically generated. | Misc/ObjectThumbnail.h | |
void MarkAsDirty() |
Marks the thumbnail as dirty. | Misc/ObjectThumbnail.h | |
| Serializers | Misc/ObjectThumbnail.h | ||
void Serialize
(
FStructuredArchive::FSlot Slot |
Misc/ObjectThumbnail.h | ||
void SetCreatedAfterCustomThumbsEnabled() |
For newly generated custom thumbnails, mark it as valid in the future. | Misc/ObjectThumbnail.h | |
void SetImage
(
const FImageView& Image |
Copy Image into Thumbnail uncompressed image data. | Misc/ObjectThumbnail.h | |
void SetImage
(
FImage&& Image |
Move Image data into Thumbnail (convert to BGRA8-SRGB if necessary) | Misc/ObjectThumbnail.h | |
void SetImageSize
(
int32 InWidth, |
Sets the image dimensions. | Misc/ObjectThumbnail.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void SetThumbnailCompressors
(
FThumbnailCompressionInterface* InPNGThumbnailCompressor, |
Static: Sets the thumbnail compressor to use when loading/saving packages. | Misc/ObjectThumbnail.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FObjectThumbnail& Other |
Misc/ObjectThumbnail.h | ||
bool operator==
(
const FObjectThumbnail& Other |
Comparison operator | Misc/ObjectThumbnail.h |