Results 1 to 37 of 37

Thread: Image Annotation & Markup Tools (RC6/Cairo Based)

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,897

    Image Annotation & Markup Tools (RC6/Cairo Based)

    Want to give users the ability to annotate images with lines, shapes, highlights, and text? This project provides flexible drawing tools and customization options for a variety of use-cases.

    Screenshot

    Name:  2025-03-16_15-29-16.jpg
Views: 3248
Size:  35.4 KB

    The above example shows a base image that has been marked up with a text box, polygon (that also happens to be "selected"), line with arrowhead endpoint, and a highlighted date/time.

    Features

    • Open BMP, PNG, and JPEG images.

    • Draw Lines with optional endpoints (Arrowhead, Ball, Bar).

    • Create rectangles and polygons with customizable fill and stroke.

    • Multiple polygon edge styles (Flat/Straight, Smooth/Bezier Curved, Ratcheted, Zig Zag, and Cloud/Bubbly).

    • Draw multi-line Text Boxes with definable font face, size, colour, and style (Bold, Italic, Underline, and Strikethrough).

    • Adjust stroke thickness, color, and style (Solid, Dashed, Dotted) for supported objects.

    • Improved Dotted stroke drawing (using Round line cap).

    • Set Background Fill Colour and Translucency for fillable shapes (Rectangles, Polygons, and Text Boxes).

    • Highlight rectangular areas for emphasis.

    • Move drawn objects around the image by mouse-click and drag, or using the arrow keys for precise positioning (hold Shift for larger movement).

    • Resize/Reshape drawn objects.

    • Undo/Redo actions.

    • Bring objects forward or backward in the Z-order with SendToFront, SendToBack, SendForward, and SendBackward methods.

    • Right-click to finalize drawing objects (Polygons, Highlighter rectangles, etc.), allowing full mouse-only interaction.

    • Select all objects via Ctrl+A or SelectAllObjects method.

    • Delete selected objects via DeleteSelectedObjects method.

    • Programmatic movement of selected objects via MoveSelectedObjects method.

    • Alternate yellow/blue dashed outline for selected objects, ensuring visibility on light and dark backgrounds.

    • Save Composite image (Base image + Drawn Objects in JPG or PNG format).

    • Export overlay images (annotations on a transparent background) as PNG.

    • Save and restore all drawn object data in JSON format.

    • Ability to set text horizontal and vertical alignment.

    • Custom text input handling via RequestText event (bypassing default InputBox).

    • Double-click text boxes to trigger the TextRequested event for editing.

    • UI refresh handling for tool mode changes via ToolModeChanged event.

    • Option to disable all built-in keyboard shortcuts via EnableKeyboardShortcuts property.

    • Optional global drop shadow rendering via EnableGlobalDropShadow property (thanks for the idea @SearchingDataOnly).

    • Zoom/Fit to Viewport


    SOURCE CODE

    RC6ImageMarkupTools19.zip

    NOTES

    • Requires Olaf Schmidt's RC6 library available at https://www.vbrichclient.com/ - so make sure to have it installed and registered on your dev machine.
    • This is a first-pass and the project has only been lightly tested so far. There are likely to be bugs, so please report any issues you discover and I will try to fix them ASAP.


    Enjoy!
    Last edited by jpbro; Apr 7th, 2025 at 02:23 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width