FImageComparisonResult

This struct holds the results of comparing an incoming image from a platform with an approved image that exists under the project hierarchy.

Unreal Engine C++ API Reference > Developer > ScreenShotComparisonTools

References

   
Module ScreenShotComparisonTools
Header /Engine/Source/Developer/ScreenShotComparisonTools/Public/ImageComparer.h
Include #include "ImageComparer.h"

Syntax

struct FImageComparisonResult  

Remarks

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.

Variables

Type Name Description
FString ApprovedFilePath Path to the file that was considered as the ground-truth. Relative to the project directory
FString ComparisonFilePath Path to the delta image between the ground-truth and the incoming file.
FDateTime CreationTime Time that the comparison was performed
FText ErrorMessage Error message that can be set during a comparison
double GlobalDifference Global difference found during comparison
FString IdealApprovedFolderPath Path to a folder where the idealized ground-truth for this comparison would be.
FString IncomingFilePath Path to the file that was generated in the test.
double MaxLocalDifference Largest local difference found during comparison
FString ReportApprovedFilePath Name of the approved file saved for the report.
FString ReportComparisonFilePath Name of the delta image saved for the report.
FString ReportIncomingFilePath Name of the incoming file saved for the report.
FString SourcePlatform Platform that the incoming image was generated on
FString SourceRHI RHI that the incoming image was generated with
FImageTolerance Tolerance Tolerance values for comparison
int32 Version Version of the image comparision result

Constructors

Type Name Description
  FImageComparisonResult ()  
  FImageComparisonResult ( const FText& Error )  

Functions

Type Name Description
bool AreSimilar () Returns true if the images were within the provided tolerance values
bool IsIdeal () Returns true if this is am ideal comparison (e.g not using a fallback for comparison)
bool IsNew () Returns true if this is a new image with no approved file to compare against
bool IsValid () Returns true if this is a new image with no approved file to compare against
void SetInvalid () Marks this struct as invalid.

Constants

Name Description
CurrentVersion  

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library