Image Annotation

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

Description

Mark image regions, add captions, and attach them to notes in Obsidian.

Reviews

No reviews yet.

Stats

2
stars
110
downloads
0
forks
14
days
7
days
7
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.2.0

A region is now a note. This release changes how annotations are stored, and does not convert 0.1 data.

  • Each region is one note, named with its title, in the region folder (Regions by default, set in the plugin settings). Its properties hold image, source, shape and region_id. Its body starts with a crop block; write about the region below it.
  • Put a region into writing with Obsidian's own embed, ![[Eyes]]. Renaming the note renames the region, and links follow. Backlinks show where a region is used.
  • The editor is a tab. Open note opens the region note beside the image. The selected region shows its text, the notes it is used in, Insert in (at the cursor of the note you last wrote in) and Insert in… (at the end of a note you choose). A region can be dragged from the list into a note, and Duplicate makes a second note for the same part of the image.
  • Drawing: icon tools with shortcuts (V, R, P), a name field beside the new shape, handles to reshape a selected region, and a polygon that finishes on its first point, a double-click, or Enter.
  • The source property is found for you: from the note you opened the image in, another region of the image, the snapshot's name, or the one note that embeds the image. When several notes embed it, you choose.
  • Web snapshots are named <source note> - image - d857.jpg. The same picture from two notes is saved once.
  • Requires Obsidian 1.13.0, for the settings search.

Removed: caption files, attachments, the preview block, and the Attach an image region to this paragraph and Remove unavailable references commands. Before its first write, 0.2 copies the old index to Image Annotation/index-0.1.json. Old caption files stay in the vault as ordinary notes; old preview blocks show as plain code blocks.

0.1.5

  • Write into a note one way, however it is open. Inserting a reference into an open note used to replace everything from the insertion point to the end of the note in one editor edit; it now replaces only the inserted lines, the same minimal edit every other note change already made. The three note writes share one implementation, with tests against a fake editor.
  • The reference block's shape (the fence, the id, the mode, four lines) is declared in one module and every reader and writer asks it.
  • Two writers could both create the plugin folder from a cold vault and one would fail; folder creation now tolerates losing that race, as the snapshot writer already did.
  • Internal: media cleanup takes the store's frozen path snapshot as a named type rather than testing whether an array is frozen; the index path is exported from the store rather than repeated in the plugin; the image-extension test and the HTML image pattern are written once; three unused exports removed.

No change to Image Annotation/index.json, captions or settings.

0.1.4

  • Refuse unsupported Markdown blocks before attaching an image region to prose. Preserve valid paragraphs after display math.
  • Refresh previews when missing captions, images or the annotation index return.
  • Scan notes once during media cleanup, then recheck changed documents and open editors. Protect encoded image references and references added during cleanup.
  • Use targeted connection and image indexes. Preserve overlapping-region order after edits and attachment order after renames.
  • Yield during large index validation, serialization and folder renames. Keep atomic external-edit conflict checks and the existing storage format.

The index still uses a single JSON file. Very large indexes retain synchronous parsing and full-file write costs. Synthetic scaling checks do not establish mobile or device-specific performance.

README file from

Github

Image Annotation

Mark part of an image. The part becomes a note you can write in and embed anywhere.

What you can do

  • Mark a rectangle, or draw an outline around an irregular shape.
  • Write about each region in its own note, named with the region's title.
  • Embed a region in any note with ![[Eyes]]. The embed shows the crop and your text.
  • See where a region is used, through Obsidian's backlinks.
  • Duplicate a region to say something different about the same part of an image.
  • Rename, reshape, or delete a region. Links to it follow, as they do for any note.

Images can come from your vault, or from web images in a note. The original image stays unchanged.

Annotate your first image

  1. Right-click an image in a note and select Annotate image. The image opens in an editor tab.
  2. Drag over the detail you want.
  3. Type a name for the region and press Enter.
  4. In the region list, select Open note. The region note opens beside the image.
  5. Write about the region.

To use the region in your writing, select Insert in in the region list. The embed goes into the note you last wrote in. To choose another note, select Insert in…; the embed goes at its end. You can also drag the region into a note, or type ![[ and the region's name.

For an irregular outline, press P or select the polygon tool. Click points around the detail. To finish, click the first point, double-click, or press Enter.

Change a region

Run Image Annotation: Browse image regions to find a region, or select the button on its crop.

  • To change the shape, drag the region or its handles. The change saves when you release the pointer.
  • To rename, double-click the name in the list or press F2.
  • For more, right-click the region: Duplicate, Redraw shape, Open source note, or Delete region.

Renaming the region note in the file explorer renames the region too. Deleting a region moves its note to the trash. Links to it stay, and show as unresolved.

The region note

Property What it holds
image The image the region is part of
source The note the image came from
shape The outline, in fractions of the image
region_id A fixed name for the region, for other plugins

The note starts with an image-region block that draws the crop. Write below it. If the plugin does not know the source note, source stays empty for you to fill in.

Settings

Region folder sets where new region notes go. The default is Regions.

Your annotations stay in your vault

Regions are ordinary notes. Without the plugin, a region note still shows its properties and your text.

When you annotate a web image, the plugin saves a local copy from its source website. It does not upload your notes. There are no accounts, analytics, or paid services.

See the guide for keys, storage, and sync. See development instructions to build and check a release.

License

MIT. Created by Micah.

Support development on GitHub Sponsors.