if( i1 == null || i2 == null ) {
log.warning("One of the images was null when loaded!");
return new CompareResult(null, ServiceUtils.createErrorReport("Error reading the images, got a NULL."));
}
// Record time take to load the inputs into memory:
sph.loaded();
// Check comparison is possible: Are the dimensions the same?
if (i1.getWidth() != i2.getWidth() || i1.getHeight() != i2.getHeight()) {
// FIXME is this really an error, or rather a 'images are different' result?
return new CompareResult(null, ServiceUtils.createErrorReport("The image dimensions must match!"));