Browse our Products

Aspose.OMR for Java 25.8.0 - Release Notes

What was changed

KeySummaryCategory
OMRJAVA‑116Improved handling of rotated images by adding an extra positioning marker to the form. See Changes in application logic for important details on backward compatibility.Enhancement
OMRJAVA‑116Additional rectangles on a scanned or photographed OMR form no longer interfere with the positioning markers. SeeImproved positioning marker detectionEnhancement

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OMR for Java 25.8.0 that may affect the code of existing applications.

Added public APIs:

The following public APIs have been added in this release:

com.aspose.omr.RotationPointPosition enumeration

List of all supported positions for new rotation reference point. By default TopRight1 is used. See Changes in application logic, List of positions

com.aspose.omr.ReferencePointsSettings class

New class that will store reference point(or positioning markers) settings. At the current moment - only position of rotation reference point.

com.aspose.omr.GlobalPageSettings.ReferencePoints field

New field that will store settings for reference points.

Updated public APIs:

No changes.

Removed public APIs:

No changes.

Changes in application logic

This section lists any changes to the program architecture and form processing algorithms introduced in Aspose.OMR for Java 25.8 that may affect the behavior of existing applications.

Additional positioning marker

To improve and speed up the processing of rotated scans of photos, a new positioning marker has been added. Exact position can be changed based on GlobalPageSettings. For example, to the upper right corner of printable OMR form.

Positioning markers

All forms generated with previous versions of Aspose.OMR for Java (that lack that extra marker) will not be recognized by Aspose.OMR for Java 25.8. The following error will be returned: “Unable to detect rotation rectangle. Since version 25.8 we use 5 reference points. Please generate template using latest version.”".

Previous versions of Aspose.OMR for Java may be able to process forms generated with Aspose.OMR for Java 25.8, but recognition results are not guaranteed to be correct.

Improved positioning marker detection

The algorithm for detecting OMR form positioning markers has been significantly improved. Now it can filter out additional elements on the form that might otherwise be mistaken for a position marker.

Filter out elements that look like a position marker

Usage examples

Check the examples below to learn more about the changes introduced in this release:

Generating template with a rotation reference point on the bottom left corner

OmrEngine engine = new OmrEngine();

GlobalPageSettings settings = new GlobalPageSettings();
settings.BubbleColor = DrawingColor.Red;
settings.PaperSize = PaperSize.Letter;
settings.FontFamily = "Arial";
//new location for rotation reference point
settings.ReferencePoints.RotationMarkerPosition = RotationPointPosition.BottomLeft1;

InputStream markupStream = new FileInputStream("C:\\Users\\User\\templates\\math.txt");
GenerationResult result = engine.generateTemplate(markupStream, settings);

// save generation result: image and .omr template
result.save("C:\\Users\\User\\templates\\", "math");

List of rotation point positions

EnumPosition
RotationPointPosition.BottomLeft1BottomLeft1
RotationPointPosition.BottomLeft2BottomLeft2
RotationPointPosition.BottomRight1BottomRight1
RotationPointPosition.BottomRight2BottomRight2
RotationPointPosition.TopLeft1TopLeft1
RotationPointPosition.TopLeft2TopLeft2
RotationPointPosition.TopRight1TopRight1
RotationPointPosition.TopRight2TopRight2