FImageComparisonResult

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

Windows
MacOS
Linux

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

Name Description

Public variable

FString

 

ApprovedFilePath

Path to the file that was considered as the ground-truth. Relative to the project directory

Public variable

FString

 

ComparisonFilePath

Path to the delta image between the ground-truth and the incoming file.

Public variable

FDateTime

 

CreationTime

Time that the comparison was performed

Public variable

FText

 

ErrorMessage

Error message that can be set during a comparison

Public variable

double

 

GlobalDifference

Global difference found during comparison

Public variable

FString

 

IdealApprovedFolderPath

Path to a folder where the idealized ground-truth for this comparison would be.

Public variable

FString

 

IncomingFilePath

Path to the file that was generated in the test.

Public variable

double

 

MaxLocalDifference

Largest local difference found during comparison

Public variable

FString

 

ReportApprovedFilePath

Name of the approved file saved for the report.

Public variable

FString

 

ReportComparisonFilePath

Name of the delta image saved for the report.

Public variable

FString

 

ReportIncomingFilePath

Name of the incoming file saved for the report.

Public variable

FString

 

SourcePlatform

Platform that the incoming image was generated on

Public variable

FString

 

SourceRHI

RHI that the incoming image was generated with

Public variable

FImageTolerance

 

Tolerance

Tolerance values for comparison

Public variable

int32

 

Version

Version of the image comparision result

Constructors

Name Description

Public function

FImageComparisonResult()

Public function

FImageComparisonResult

(
    const FText& Error
)

Functions

Name Description

Public function Const

bool

 

AreSimilar()

Returns true if the images were within the provided tolerance values

Public function Const

bool

 

IsIdeal()

Returns true if this is am ideal comparison (e.g not using a fallback for comparison)

Public function Const

bool

 

IsNew()

Returns true if this is a new image with no approved file to compare against

Public function Const

bool

 

IsValid()

Returns true if this is a new image with no approved file to compare against

Public function

void

 

SetInvalid()

Marks this struct as invalid.

Constants

Name

Description

CurrentVersion