Navigation
| Name | ImageCore |
| Type | Runtime |
| Location | /Engine/Source/Runtime/ImageCore/ |
| Module Build Rules | ImageCore.Build.cs |
Classes
| Name | Remarks |
|---|---|
| USharedImageConstRefBlueprintFns |
Structs
| Name | Remarks |
|---|---|
| FDDSFile | Metadata structure for a DDS file, with access pointers for the raw texture data (i.e. unconverted from the DXGI format). |
| FDDSMip | One of these for each mip of a DDS. |
| FImage | Structure for raw image data. |
| FImageInfo | FImageInfo describes a 2d pixel surface it can be used by FImage or FImageView |
| FImageView | |
| FImageViewStrided | FImageViewStrided cannot derive from FImageView you can implicitly convert FImage -> FImageView -> FImageViewStrided but you cannot convert FImageViewStrided -> the others, because they can't have stride |
| FMipMapImage | Structure for raw image data used for Image formats that support Mip Maps. |
| FSharedImage | |
| FSharedImageConstRefBlueprint | Exposes a FSharedImage to blueprint in an unalterable way. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FSharedImageConstRef | TRefCountPtr< const struct FSharedImage > | ImageCore.h | |
| FSharedImageRef | TRefCountPtr< struct FSharedImage > | ImageCore.h |
Enums
Public
| Name | Remarks |
|---|---|
| ERawImageFormat::Type | Enumerates supported raw image formats. should map one-to-one with ETextureSourceFormat |
| FImageCore::EResizeImageFilter | Filter choice for ResizeImage |
| FImageCore::ProcessLinearPixelsAction | The easy and efficient way to write a pixel processing loop that supports all pixel formats is to use |
| UE::DDS::EChannelOrder | Channel ordering for 8-bit formats. |
| UE::DDS::EDDSError | Error codes. |
| UE::DDS::EDDSFormatVersion | What version of DDS file to write. |
| UE::DDS::EDDSReadMipMode | Mip data read modes. |
| UE::DDS::EDXGIFormat | Complete list of formats. |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int64 ERawImageFormat::GetBytesPerPixel
(
Type Format |
RGBA -> G8 takes from the R channel G8 -> RGBA replicated to gray | ImageCore.h | |
EGammaSpace ERawImageFormat::GetDefaultGammaSpace
(
Type Format |
When converting from pixel bags that don't store gamma to FImage you can use this to guess the gamma they probably wanted do not use when a real gamma flag is available! | ImageCore.h | |
bool ERawImageFormat::GetFormatFromString
(
FUtf8StringView InString, |
ImageCore.h | ||
bool ERawImageFormat::GetFormatNeedsGammaSpace
(
Type Format |
G8 and BGRA8 are affected by Gamma, 16/32 is NOT (they are always Linear) this happens to be the same as IsU8Channels() at the moment, but don't assume that | ImageCore.h | |
const TCHAR * ERawImageFormat::GetName
(
Type Format |
ImageCore.h | ||
const FUtf8StringView ERawImageFormat::GetNameView
(
Type Format |
ImageCore.h | ||
const FLinearColor ERawImageFormat::GetOnePixelLinear
(
const void* PixelData, |
Get one pixel of Format type from PixelData and return in Linear color. | ImageCore.h | |
const FLinearColor ERawImageFormat::GetOnePixelLinear
(
const void* PixelData, |
Get one pixel of Format type from PixelData and return in Linear color. | ImageCore.h | |
bool ERawImageFormat::HasAlphaChannel
(
Type Format |
ImageCore.h | ||
bool ERawImageFormat::IsHDR
(
Type Format |
ImageCore.h | ||
bool ERawImageFormat::IsU8Channels
(
Type Format |
IsU8Channels is not true for BGRE8, it means channels of uint8 in [0,255]. | ImageCore.h | |
int ERawImageFormat::NumChannels
(
Type Format |
ImageCore.h | ||
void FImageCore::ComputeChannelLinearMinMax
(
const FImageView& InImage, |
Compute the min/max of each channel to get value ranges Colors are converted to float Linear Gamma | ImageCore.h | |
FLinearColor FImageCore::ComputeImageLinearAverage
(
const FImageView& Image |
ComputeImageLinearAverage compute the average linear color of the image image can be any pixel format parallel processing is used, but the result is not machine-dependent | ImageCore.h | |
void FImageCore::CopyImage
(
const FImageView& SrcImage, |
Copy FImageView data, converting pixels if necessary. | ImageCore.h | |
void FImageCore::CopyImageRGBABGRA
(
const FImageView& SrcImage, |
Copy Image, swapping RB, SrcImage must be BGRA8 or RGBA16. | ImageCore.h | |
void FImageCore::CopyImageTo2U16
(
const FImageView& SrcImage, |
Copy Image to 2xU16 ; Dest Image should be allocated as BGRA8 but is actually 2xU16 Sizes must match. | ImageCore.h | |
bool FImageCore::DetectAlphaChannel
(
const FImageView& InImage |
Detects whether or not the image contains an alpha channel where at least one texel is != 255. | ImageCore.h | |
void FImageCore::ImageParallelFor
(
const TCHAR* DebugName, |
Lambda is a functor that works on an FImageView() it will be called with portions of the image each portion will be a 2d FImageView (NumSlices == 1) use like : FImageCore::ImageParallelFor( TEXT("Texture.AdjustImageColorsFunc.PF"),Image, & { | ImageParallelFor.h | |
int32 FImageCore::ImageParallelForComputeNumJobs
(
const FImageView& Image, |
FImage is tight packed in memory with slices adjacent to each other so we can just treat it was a 2d image with Height *= NumSlices | ImageParallelFor.h | |
int64 FImageCore::ImageParallelForComputeNumRows
(
const FImageView& Image |
ImageParallelFor treats the image as being 2d (no slices) but with *NumSlices rows. | ImageParallelFor.h | |
FImageView FImageCore::ImageParallelForGetOneRowView
(
const FImageView& Image, |
Y indexes across slices and SizeY here : | ImageParallelFor.h | |
int64 FImageCore::ImageParallelForMakePart
(
FImageView* Part, |
ImageParallelFor.h | ||
void FImageCore::ImageParallelProcessLinearPixels
(
const TCHAR* DebugName, |
Parallel process image as TArrayView64 |
ImageParallelFor.h | |
bool FImageCore::operator!
(
EResizeImageFilter E |
ImageCore.h | ||
EResizeImageFilter FImageCore::operator&
(
EResizeImageFilter Lhs, |
ImageCore.h | ||
EResizeImageFilter & FImageCore::operator&=
(
EResizeImageFilter& Lhs, |
ImageCore.h | ||
EResizeImageFilter FImageCore::operator^
(
EResizeImageFilter Lhs, |
ImageCore.h | ||
EResizeImageFilter & FImageCore::operator^=
(
EResizeImageFilter& Lhs, |
ImageCore.h | ||
EResizeImageFilter FImageCore::operator|
(
EResizeImageFilter Lhs, |
ImageCore.h | ||
EResizeImageFilter & FImageCore::operator|=
(
EResizeImageFilter& Lhs, |
ImageCore.h | ||
EResizeImageFilter FImageCore::operator~
(
EResizeImageFilter E |
ImageCore.h | ||
void FImageCore::ProcessLinearPixels
(
const FImageView& Image, |
ProcessLinearPixels act on image pixels as TArrayView64 |
ImageParallelFor.h | |
void FImageCore::ResizeImage
(
const FImageView& SourceImage, |
ResizeImage : DestImage should be already allocated; DestImage will be filled in specified format filter is always computed in floating point, gamma correct linear light, but no intermediate conversion is done note: some filters (the three "Cubic" options) will change the image even if Source.Size == Dest.Size this function can be used to apply filters on same-size image with the Cubic set the "Adaptive" (and Default) filters automatically change depending on if the resize is an upsample or downsample, and are nops for same size | ImageCore.h | |
void FImageCore::ResizeImageAllocDest
(
const FImageView& SourceImage, |
ResizeImage variant. | ImageCore.h | |
void FImageCore::ResizeImageAllocDest
(
const FImageView& SourceImage, |
ResizeImage variant. | ImageCore.h | |
void FImageCore::ResizeImageInPlace
(
FImage& Image, |
ResizeImage variant. | ImageCore.h | |
void FImageCore::ResizeImageInPlace
(
FImage& Image, |
ResizeImage variant. | ImageCore.h | |
void FImageCore::ResizeTo
(
const FImageView& SourceImage, |
Copies and resizes the image to a destination image with the specified size and format. | ImageCore.h | |
void FImageCore::SanitizeFloat16AndSetAlphaOpaqueForBC6H
(
const FImageView& InOutImage |
Clamp Float16 colors which aren't encodable in the BC6H format RGB is clamped to non-negative and finite A is set to 1.0 | ImageCore.h | |
bool FImageCore::ScaleChannelsSoMinMaxIsInZeroToOne
(
const FImageView& ImageToModify |
If the image has any values outside the [0,1] range, rescale that edge of the domain so that it is in [0,1] does not affect images that were previously in [0,1] | ImageCore.h | |
void FImageCore::SetAlphaOpaque
(
const FImageView& InImage |
Change alpha channel to opaque, if present | ImageCore.h | |
void FImageCore::TransformToWorkingColorSpace
(
const FImageView& InLinearImage, |
Apply a color space transformation from the source chromaticities to the engine's working color space. | ImageCore.h | |
void FImageCore::TransposeImageRGBABGRA
(
const FImageView& Image |
Swap RB channels on Image. Image must be BGRA8 or RGBA16. | ImageCore.h | |
void FImageCoreDelta::AddSplitStridedViewsForDelta
(
TArray64< FImageViewStrided >& OutViews, |
Split InView into tiles and add to OutViews. Will add 1 more entries to OutViews. | ImageCoreDelta.h | |
void FImageCoreDelta::DoTransform
(
const FImageViewStrided& InImage, |
Do Delta Transform bForward=false is the inverse transform | ImageCoreDelta.h | |
ERawImageFormat::Type FImageCoreUtils::ConvertToRawImageFormat
(
ETextureSourceFormat Format |
ETextureSourceFormat and ERawImageFormat::Type are one-to-one : | ImageCoreUtils.h | |
ETextureSourceFormat FImageCoreUtils::ConvertToTextureSourceFormat
(
ERawImageFormat::Type Format |
ImageCoreUtils.h | ||
FName FImageCoreUtils::ConvertToUncompressedTextureFormatName
(
ERawImageFormat::Type Format |
ImageCoreUtils.h | ||
ETextureSourceFormat FImageCoreUtils::GetCommonSourceFormat
(
ETextureSourceFormat Format1, |
Returns ETextureSourceFormat which can be used to efficiently store data encoded in both input formats. | ImageCoreUtils.h | |
int32 FImageCoreUtils::GetMipCountFromDimensions
(
int32 InSizeX, |
Returns the number of mips that constitute a full mip chain for the given top level mip size. | ImageCoreUtils.h | |
EPixelFormat FImageCoreUtils::GetPixelFormatForRawImageFormat
(
ERawImageFormat::Type InFormat, |
EPixelFormat is the graphics texture pixel format it is a much larger superset of ERawImageFormat GetPixelFormatForRawImageFormat does not map to the very closest EPixelFormat instead map to a close one that is actually usable as Texture if *pOutEquivalentFormat != InFormat , then conversion is needed and conversion can be done using CopyImage to OutEquivalentFormat | ImageCoreUtils.h | |
ERawImageFormat::Type FImageCoreUtils::GetRawImageFormatForPixelFormat
(
EPixelFormat PF |
Return an ERawImageFormat for a PixelFormat these are not equal and you cannot blit between them it's just the closest reasonable thing that can hold that PixelFormat often there is no good match | ImageCoreUtils.h | |
bool FImageCoreUtils::IsImageImportPossible
(
int64 Width, |
IsImageImportPossible returns false if the image dimensions are not supported to import if this function returns true, image import might still fail due to further constraints (this constraint is weaker than the one actually required) (see IsImportResolutionValid, which is also still weaker than the final constraint) IsImageImportPossible does not check current Engine config or platform limits, only hard-coded absolute limits | ImageCoreUtils.h | |
int32 ImageParallelForComputeNumJobsForPixels
(
int64& OutNumPixelsPerJob, |
Functions | ImageCore.h | |
int32 ImageParallelForComputeNumJobsForRows
(
int32& OutNumItemsPerJob, |
ImageCore.h |