double sampleRatio = ((double) sampleWidth) / sampleHeight;
double resultRatio = ((double) resultWidth) / resultHeight;
v = new BooleanValue();
((BooleanValue) v).bool(0 == Double.compare(sampleRatio, resultRatio));
v.setComment(String.format("Reference value: %s\nActual value: %s",
formatter.formatFloat(sampleRatio), formatter.formatFloat(resultRatio)));
} catch (NumberFormatException e) {
// not all values are available - aspectRatio cannot
// be calculated
v = new BooleanValue();
v.setComment("Image width and/or height are not available - aspectRatio cannot be calculated");