Here is the example code:

// Get image of an element
var actualImage = SeS('Username').GetBitmap();
// Compose path to expected image
var expectedImagePath = '%WORKDIR%/Images/Step2.png';
// Compare images
Tester.AssertImage("Images are equal", actualImage, expectedImagePath);

Find sample test on GitHub:

https://github.com/Inflectra/rapise-samples/tree/master/CompareImages