Here is the example code:
var actualImage = SeS('Username').GetBitmap();
var expectedImagePath = '%WORKDIR%/Images/Step2.png';
Tester.AssertImage("Images are equal", actualImage, expectedImagePath);
Find sample test on GitHub:
https://github.com/Inflectra/rapise-samples/tree/master/CompareImages