Image Graph

by suffername
5
4
3
2
1
Score: 50/100

Description

Explore and connect images and their regions in Obsidian.

Reviews

No reviews yet.

Stats

0
stars
83
downloads
0
forks
13
days
6
days
6
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
16
commits

Latest Version

7 days ago

Changelog

0.3.0

Works with Image Annotation 0.2, where a region is a note.

  • An image note's annotations property links the notes of the regions Image Annotation drew on the image: [[Regions/Eyes|Eyes]]. Selecting such a region offers Open region note, and an image extracted from one records the note as region_note.
  • A new image note is never named exactly as the note its picture came from, which read as the article itself in note search. A snapshot Image Annotation named <source note> - image - d857 gives its note the same name; another picture with a known source note is <source note> - image - b2df.
  • A note's name is now set once. Each load renamed every image note to the naming rule's current answer, so a note could change its name without anyone renaming it. Only notes in the old _Image Graph/Images folder are still moved. Loading no longer reads every image note's properties to decide this.

Image Annotation 0.1 attachments are no longer read. With Image Annotation 0.1, regions still show, without links to notes.

0.2.3

Explore a selection, and a graph that holds still.

  • Explore acts on every selected image. With several starting images none is anchored, so all of them can be moved and pinned: a smaller space to arrange and draw connections in. The status line traces a path from whichever starting image reached the image you select.
  • Drawing a connection while exploring moves nothing. The view rebuilds on every change, and before this every image of a multi-image exploration moved by hundreds of pixels each time; an anchored exploration re-seeded every unpinned image when one new image arrived. A rebuild now holds every placed image and places only newcomers; changing the depth or expanding an image lets unpinned images settle again from where they were.
  • The exploration layout settles. Its force pass cools over its last third and stops when nothing moves; at a fixed step it never settled at all. A multi-image exploration puts the starting images on the inner ring and their neighbours around them.
  • A selection of more images than the exploration limit is capped and says so, like a neighbourhood that size.

The file explorer follows the selection.

  • Select one image and the file explorer highlights its file, and scrolls to it if auto-reveal is on, as it does for the open note. Focus stays on the canvas.

Right-click menus, keys and the toolbar agree.

  • A right-click on one of several selected images keeps the selection, so the menu acts on all of them. It used to collapse the selection to that image, and the multi-image items could only be reached from the empty canvas beside them.
  • One menu, in sections: the thing under the pointer, the view, undo and redo, export, and delete last. A right-click on an image, a region or a connection shows only that thing; the empty canvas, the Actions button and Shift+F10 show the view too. Every item has an icon. Example connections is a command, not a menu item.
  • X and P expand and pin the whole selection, as the menu does. Pin over a set is one state: all pinned becomes all free, anything else becomes all pinned.
  • The Actions menu offers Back to the vault, Fit everything, Zoom to the selection and Move images, which were keyboard-only.

The properties panel is one line per property.

  • Name, format, value and a small × on one line, as in Obsidian's own Properties. Lists and groups open beneath their row. Placeholders replace the repeated captions and the help paragraphs; a reserved name is reported on its row as it is typed.
  • The panel names what is chosen: an image with its thumbnail, name and folder; a connection's two ends; a region's label. Save stays in view at the bottom.

Fixed:

  • Some cards in the whole-vault view stayed blank until you zoomed in. Their atlas tiles had been saved fully transparent: a page that inherited its canvas from the previous layout was resized, and resizing clears a canvas. Tiles are no longer wiped, a blank tile in a saved page is decoded again, and the vault repairs itself on the next open.
  • On the first paint after a plugin reload the vault was sometimes at 0% in the top-left corner, or at 100% on the origin. The first fit now waits for both the images and a laid-out pane, whichever arrives last.

0.2.2

Regions from the Image Annotation plugin.

  • Regions drawn in Image Annotation appear on their images with a dashed outline. The graph reads that plugin's index and never writes to it.
  • Select one to see the notes it is attached to. Open it in Image Annotation, or open that plugin's editor on any image, while it is loaded.
  • Connections can reach a foreign region. Remove connections to deleted Image Annotation regions clears the ones whose region is gone, and undo restores them.
  • Extracted images are named after their region and source, Dark water · Harbour at dusk.png, instead of an id.
  • An extracted image's companion links to the notes its Image Annotation region was attached to. Companion notes that already exist carry an annotations property with the same links.
  • A web image Image Annotation saved gets a companion named after the note it was clipped from, with source_url and source_note.

Snapshots and note embeds draw what the workspace draws.

Also in this release:

  • Labels on the canvas are set in the theme's font. They were a generic family; exports and embeds had already been corrected.

  • TIFF images the catalog holds are now offered by Explore the active image, Find the active image and the file menu, and a change to one refreshes the graph.

  • A companion note with Windows line endings is read by the extraction backfill, as the store already read it.

  • Internal: the graph's traversal, force layout, edge endpoints and region-shape algebra are four modules (they were one file); one Palette for both renderers; the route limits declared once; the decode-slot count and the two cache budgets named once; the property editor reads the input it holds rather than re-finding it; focusing an image uses the one fit.

  • Labels and captions in exports and embeds used a font string the canvas cannot parse, so they were drawn at 10px in the default face. They now use the interface font at the intended size.

  • Connections in a snapshot go around the images between their ends, as they do in the workspace, instead of cutting through them.

  • A missing image is painted in the error colour in a snapshot, as in the workspace, instead of looking like an ordinary card.

  • Regions from Image Annotation are dashed in a snapshot, as in the workspace.

  • A recording canvas in the tests holds the still renderer to what the workspace draws.

0.2.1

A clearer exploration graph.

  • Images occupy hop-based bands around the starting image. Fit connections centers the starting image.
  • Relevant connections stand out. Other connections and region outlines stay faint.
  • Selection and hover reveal relation labels. Labels avoid images, captions, and other labels.
  • Extracted images use their region names as captions. Full filenames remain in Properties.
  • Connections route around unrelated images where a short route is available.
  • Layout spacing reserves room for captions and keeps manually pinned images fixed.

Checked in Image vault with 20,005 images and a 16-image, three-hop exploration. All 76 behavior tests and the release-script test pass. Physical mobile interaction and multi-device synchronization remain unverified.

0.2.0

Canvas interaction, after a study of Penpot's workspace.

  • One selection replaces three fields that were kept in step by hand. Two states the old model could reach are now unrepresentable: an image ringed while a connection was edited, and a region edited while its image was deselected.
  • The wheel scrolls the canvas and Ctrl or ⌘ with the wheel zooms, which is what Obsidian's own canvas does. A plain scroll no longer zooms. A trackpad can now pan, which it could not before.
  • The pointer names what it is over before you press: a ring on the image or region under it, a thicker connection, and a cursor that says which.
  • Shift-drag selects every image the band touches. Dragging one image of a selection carries all of them. Arrow keys move the selection one grid step, five with Shift.
  • A selected region carries grips. Dragging one resizes it; before this a region could only be redrawn or typed as numbers.
  • ? lists every shortcut. Shift with 0, 1 or 2 zooms to 100%, to everything, or to the selection.
  • A spatial index backs the renderer and the hit test, so both cost the viewport rather than the vault.

Verified against the same vault of 20,005 generated images with trusted input: band selection, a region grip resizing and saving, several images moving together, and hover naming an image against a region. See performance and verification.

0.1.0

First release.

  • Open every image in the vault as one workspace, with thumbnails at each zoom level.
  • Draw rectangle and polygon regions that stay inside their parent image.
  • Connect images, regions, or both, and label each connection through its relation property.
  • Describe any selection with named properties in Text, Number, List, or group form. No YAML is required.
  • Explore one image through one, two, or three connection steps, expand single neighbors, pin images, and trace the shortest path between two of them.
  • Create a new image from a region, with a companion note recording its source image and source region.
  • Export the current graph, the selection, or the whole vault as an editable Canvas, or the viewport as a visual snapshot.

Image properties and tags live in ordinary companion Markdown notes, so they stay readable with the plugin disabled. See the storage guide.

Verified on desktop against a vault of 20,000 generated 2048 × 2048 images. Physical mobile interaction, multi-device synchronization, and performance for other image formats and sizes are not verified. See development verification.

README file from

Github

Image Graph

Explore your image vault, mark regions, and connect images with labeled relationships.

Three-hop exploration with a centered starting image, readable crop captions, and a highlighted connection.

Features

  • A whole-vault workspace with thumbnails at every zoom level.
  • Rectangle and polygon regions that stay inside their parent images.
  • Connections between images, regions, or both.
  • Free-form YAML properties on connections, with relation as the visible label.
  • Optional arrows in either direction or both directions.
  • Image metadata and tags in ordinary companion Markdown notes.
  • Exploration from one image through one, two, or three connection steps.
  • Separate expansion of neighbors, pinned images, and path highlights.
  • Editable Canvas exports and visual snapshots.
  • Explicit image extraction from a region, with source references.
  • Regions drawn with the Image Annotation plugin, shown in the graph and opened in that plugin.

Start

  1. Open Image Graph: Open workspace from the command palette.
  2. Select an image.
  3. Open its context menu to draw a region or explore its connections.

The context menu opens with a right click or a long press. The graph starts with the whole vault. Regions do not become separate images unless you choose the extraction action.

The first overview builds small thumbnails in the background. The status bar shows progress. Later sessions reuse these thumbnails from the vault.

Controls

Action Control
Move the view Drag, scroll, or hold Space while dragging
Zoom Ctrl or ⌘ and scroll, or pinch
Select an image, region or connection Click or tap
Select several images Shift-click, or shift-drag a band
Move images Press M, then drag one to carry the whole selection
Nudge the selection Arrow keys, five steps with Shift
Resize a region Select it, then drag one of its grips
Context actions Right click or long press
Draw a rectangle R
Draw a polygon G, select corners, then select Finish polygon
Connect a selection C
Explore an image E
Open properties I
Every shortcut ?

Keyboard controls apply inside the graph. Text fields retain normal typing behavior. In the whole vault, moved images snap to a grid by their top-left corner. Navigation does not move images or rebuild their thumbnails.

Properties

The Properties panel pairs a property name with its content. For example, name a property creator and enter the person's name as its content. Choose Text for words, Number for quantities, or List for several items, such as tags. You do not need to write YAML.

Each connection includes a property named relation. Its content, such as “resembles,” appears beside the connection. Additional properties can describe confidence, sources, or other details.

Image properties and tags live in companion Markdown notes. When an image first needs saved metadata or annotations, the plugin creates its companion note. Opening the vault does not create a note for every image.

Explore connections

Exploration centers on one image, or on every image you selected. With several starting images none is anchored, so you can arrange all of them and draw connections in a smaller space. The depth control includes its neighbors and their connections. Paths can enter one region and continue through another region of the same image. The relation filter highlights matching connections without hiding the surrounding three-hop paths. Choose Focus selected for a closer view of an image.

Exploration follows connections in either direction. Arrowheads still show each connection's stated direction. A path through several images does not assert a direct relationship between its ends.

Exploration uses a temporary force layout organized into hop bands. The starting image stays centered when you fit the connections. Background connections and region outlines stay faint. Selecting an image or hovering over a connection reveals relevant labels. Labels avoid images, captions, and other labels. Crowded labels stay hidden. Extracted images use region names as captions. Full filenames remain in Properties. Returning to the whole vault restores its arrangement and viewport.

See the current exploration layout.

Export

An editable Canvas contains image cards, relation labels, and arrows. Native Canvas connections attach to image cards rather than regions inside them.

A visual snapshot contains the current viewport as a PNG inside a Canvas. It preserves region outlines and connection endpoints. Its individual elements are not editable.

Both exports are independent snapshots. Canvas edits do not update the graph. Editable exports reference the original image files.

Example connections

The command Create example connections between twelve images creates an illustrative network. These connections are examples, not claims inferred from image content. Their properties identify them as examples.

With Image Annotation

If the Image Annotation plugin is installed, its regions appear on their images with a dashed outline. Select one to open its region note, open it in Image Annotation, connect it, or extract it as an image. Edit or delete those regions in Image Annotation. The graph reads its index and never writes to it.

Storage and compatibility

See the storage guide for file locations and recovery behavior. See workflow recordings for each workflow as a separate clip with its written steps. See development contracts to build from source, and rendering performance for measured frame costs. Physical mobile testing and multi-device conflict testing remain separate from desktop verification.

Credits and license

Created by Micah. Support development.

MIT license. See LICENSE.