Class of static image utility functions. 更多...
#include <ImageUtils.h>
静态 Public 成员函数 | |
| static ENGINE_API void | CompressImageArray (int32 ImageWidth, int32 ImageHeight, const TArray< FColor > &SrcData, TArray< uint8 > &DstData) |
| Compress image to .png uint8 array. 更多... | |
| static ENGINE_API UTexture2D * | CreateCheckerboardTexture (FColor ColorOne=FColor(64, 64, 64), FColor ColorTwo=FColor(128, 128, 128), int32 CheckerSize=32) |
| Creates a new UTexture2D with a checkerboard pattern. 更多... | |
| static ENGINE_API UTexture2D * | CreateTexture2D (int32 SrcWidth, int32 SrcHeight, const TArray< FColor > &SrcData, UObject *Outer, const FString &Name, const EObjectFlags &Flags, const FCreateTexture2DParameters &InParams) |
| Creates a 2D texture from a array of raw color data. 更多... | |
| static ENGINE_API void | CropAndScaleImage (int32 SrcWidth, int32 SrcHeight, int32 DesiredWidth, int32 DesiredHeight, const TArray< FColor > &SrcData, TArray< FColor > &DstData) |
| Crops, and scales an image from a raw image array. 更多... | |
| static ENGINE_API bool | ExportRenderTarget2DAsHDR (UTextureRenderTarget2D *TexRT, FArchive &Ar) |
| Exports a UTextureRenderTarget2D as an HDR image on the disk. 更多... | |
| static ENGINE_API bool | ExportRenderTarget2DAsPNG (UTextureRenderTarget2D *TexRT, FArchive &Ar) |
| Exports a UTextureRenderTarget2D as an HDR image on the disk. 更多... | |
| static ENGINE_API bool | ExportRenderTargetCubeAsHDR (UTextureRenderTargetCube *TexRT, FArchive &Ar) |
| Exports a UTextureRenderTargetCube as an HDR image on the disk. 更多... | |
| static ENGINE_API bool | ExportTexture2DAsHDR (UTexture2D *TexRT, FArchive &Ar) |
| Exports a UTexture2D as an HDR image on the disk. 更多... | |
| static ENGINE_API bool | ExportTextureCubeAsHDR (UTextureCube *TexRT, FArchive &Ar) |
| Exports a UTextureCube as an HDR image on the disk. 更多... | |
| static ENGINE_API void | ImageResize (int32 SrcWidth, int32 SrcHeight, const TArray64< FLinearColor > &SrcData, int32 DstWidth, int32 DstHeight, TArray64< FLinearColor > &DstData) |
| Resizes the given image using a simple average filter and stores it in the destination array. 更多... | |
| static ENGINE_API void | ImageResize (int32 SrcWidth, int32 SrcHeight, const TArray< FColor > &SrcData, int32 DstWidth, int32 DstHeight, TArray< FColor > &DstData, bool bLinearSpace) |
| Resizes the given image using a simple average filter and stores it in the destination array. 更多... | |
| static ENGINE_API void | ImageResize (int32 SrcWidth, int32 SrcHeight, const TArrayView64< const FLinearColor > &SrcData, int32 DstWidth, int32 DstHeight, const TArrayView64< FLinearColor > &DstData) |
| Resizes the given image using a simple average filter and stores it in the destination array. 更多... | |
| static ENGINE_API void | ImageResize (int32 SrcWidth, int32 SrcHeight, const TArrayView< const FColor > &SrcData, int32 DstWidth, int32 DstHeight, const TArrayView< FColor > &DstData, bool bLinearSpace) |
| Resizes the given image using a simple average filter and stores it in the destination array. 更多... | |
| static ENGINE_API UTexture2D * | ImportBufferAsTexture2D (const TArray< uint8 > &Buffer) |
| Imports a texture a buffer and creates Texture2D from it | |
| static ENGINE_API UTexture2D * | ImportFileAsTexture2D (const FString &Filename) |
| Imports a texture file from disk and creates Texture2D from it | |
Class of static image utility functions.
|
static |
Compress image to .png uint8 array.
| ImageHeight | Source image width. |
| ImageWidth | Source image height. |
| SrcData | Raw image array. |
| DstData | compressed image array. |
|
static |
Creates a new UTexture2D with a checkerboard pattern.
| ColorOne | The color of half of the squares. |
| ColorTwo | The color of the other half of the squares. |
| CheckerSize | The size in pixels of each checker square. |
|
static |
Creates a 2D texture from a array of raw color data.
| SrcWidth | Source image width. |
| SrcHeight | Source image height. |
| SrcData | Source image data. |
| Outer | Outer for the texture object. |
| Name | Name for the texture object. |
| Flags | Object flags for the texture object. |
| InParams | Params about how to set up the texture. |
|
static |
Crops, and scales an image from a raw image array.
| SrcWidth | Source image width. |
| SrcHeight | Source image height. |
| DesiredWidth | Desired Width. |
| DesiredHeight | Desired Height. |
| SrcData | Raw image array. |
| DstData | compressed image array. |
|
static |
Exports a UTextureRenderTarget2D as an HDR image on the disk.
| TexRT | The render target to export |
| Ar | Archive to fill with data. |
|
static |
Exports a UTextureRenderTarget2D as an HDR image on the disk.
| TexRT | The render target to export |
| Ar | Archive to fill with data. |
|
static |
Exports a UTextureRenderTargetCube as an HDR image on the disk.
| TexRT | The render target cube to export |
| Ar | Archive to fill with data. |
|
static |
Exports a UTexture2D as an HDR image on the disk.
| TexRT | The texture to export |
| Ar | Archive to fill with data. |
|
static |
Exports a UTextureCube as an HDR image on the disk.
| TexRT | The texture cube to export |
| Ar | Archive to fill with data. |
|
static |
Resizes the given image using a simple average filter and stores it in the destination array.
This version constrains aspect ratio.
| SrcWidth | Source image width. |
| SrcHeight | Source image height. |
| SrcData | Source image data. |
| DstWidth | Destination image width. |
| DstHeight | Destination image height. |
| DstData | Destination image data. |
|
static |
Resizes the given image using a simple average filter and stores it in the destination array.
This version constrains aspect ratio.
| SrcWidth | Source image width. |
| SrcHeight | Source image height. |
| SrcData | Source image data. |
| DstWidth | Destination image width. |
| DstHeight | Destination image height. |
| DstData | Destination image data. |
|
static |
Resizes the given image using a simple average filter and stores it in the destination array.
This version constrains aspect ratio. Accepts TArrayViews but requires that DstData be pre-sized appropriately
| SrcWidth | Source image width. |
| SrcHeight | Source image height. |
| SrcData | Source image data. |
| DstWidth | Destination image width. |
| DstHeight | Destination image height. |
| DstData | Destination image data. (must already be sized to DstWidth*DstHeight) |
|
static |
Resizes the given image using a simple average filter and stores it in the destination array.
This version constrains aspect ratio. Accepts TArrayViews but requires that DstData be pre-sized appropriately
| SrcWidth | Source image width. |
| SrcHeight | Source image height. |
| SrcData | Source image data. |
| DstWidth | Destination image width. |
| DstHeight | Destination image height. |
| DstData | Destination image data. (must already be sized to DstWidth*DstHeight) |