Navigation
API > API/Developer > API/Developer/ScreenShotComparisonTools
This struct holds the results of comparing an incoming image from a platform with an approved image that exists under the project hierarchy.
All paths in this structure should be portable. Test results (including this struct) result can be serialized to JSON and stored on the network as during automation runs then opened in the editor to commit / approve changes to the local project.
| Name | FImageComparisonResult |
| Type | struct |
| Header File | /Engine/Source/Developer/ScreenShotComparisonTools/Public/ImageComparer.h |
| Include Path | #include "ImageComparer.h" |
Syntax
USTRUCT ()
struct FImageComparisonResult
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| ImageComparer.h | |||
FImageComparisonResult
(
const FText& Error |
ImageComparer.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CurrentVersion | int32 | ImageComparer.h | |
| OldestSupportedVersion | int32 | ImageComparer.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ApprovedFilePath | FString | Path to the file that was considered as the ground-truth. Relative to the project directory | ImageComparer.h | |
| bSkipAttachingImages | bool | Whether to skip saving and attaching images to the report for this test | ImageComparer.h | |
| ComparisonFilePath | FString | Path to the delta image between the ground-truth and the incoming file. | ImageComparer.h | |
| ComparisonId | FGuid | Id of the comparison request | ImageComparer.h | |
| CreationTime | FDateTime | Time that the comparison was performed | ImageComparer.h | |
| ErrorMessage | FText | Error message that can be set during a comparison | ImageComparer.h | |
| GlobalDifference | double | Global difference found during comparison | ImageComparer.h | |
| IdealApprovedFolderPath | FString | Path to a folder where the idealized ground-truth for this comparison would be. | ImageComparer.h | |
| IncomingFilePath | FString | Path to the file that was generated in the test. | ImageComparer.h | |
| MaxLocalDifference | double | Largest local difference found during comparison | ImageComparer.h | |
| ReportApprovedFilePath | FString | Name of the approved file saved for the report. | ImageComparer.h | |
| ReportComparisonFilePath | FString | Name of the delta image saved for the report. | ImageComparer.h | |
| ReportIncomingFilePath | FString | Name of the incoming file saved for the report. | ImageComparer.h | |
| ScreenshotPath | FString | Path of the screenshot (includes variant if applicable) | ImageComparer.h | |
| SourcePlatform | FString | Platform that the incoming image was generated on | ImageComparer.h | |
| SourceRHI | FString | RHI that the incoming image was generated with | ImageComparer.h | |
| Tolerance | FImageTolerance | Tolerance values for comparison | ImageComparer.h | |
| Version | int32 | Version of the image comparision result | ImageComparer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AreSimilar() |
Returns true if the images were within the provided tolerance values | ImageComparer.h | |
bool IsIdeal() |
Returns true if this is am ideal comparison (e.g not using a fallback for comparison) | ImageComparer.h | |
bool IsNew() |
Returns true if this is a new image with no approved file to compare against | ImageComparer.h | |
bool IsValid() |
Returns true if this is a new image with no approved file to compare against | ImageComparer.h | |
void SetInvalid () |
Marks this struct as invalid. | ImageComparer.h |