• v0.5.0 f48326748d

    noorlab released this 2026-10-10 06:50:46 +08:00 | 0 commits to main since this release

    Added

    • Canvas: Ctrl+C / Ctrl+X and the item menu's Copy / Cut work on the selected pictures
      and annotations. The clipboard gets a transparent picture of them alone (Output
      settings apply) and Ctrl+V pastes them back as editable items, each paste offset
      from the last; cutting is one undo step and does not ask. With nothing selected
      Ctrl+C still copies the whole canvas.
    • Preferences → Snip → Behavior, Gemini: the model box lists the key's text models
      (fetched from the API at most daily or when the key changes, cached in
      gemini_models.json in the data folder) and still takes any typed name; Get a key…
      shows how to create an API key; Test translates a word and tells how long Gemini
      took. The Gemini settings show only while Gemini is the translation engine. The
      default model is now gemini-3.1-flash-lite (3.5-flash-lite took 12–35 s to answer).
    • OCR and translation failures: the bar's status ends in a ? mark whose tooltip gives
      the technical reason (engine and model, HTTP status and Gemini's error code and
      message, or the HRESULT), also written to the log.
    • Pin toolbar: select button (left of the tools), as on the snip toolbar. While on, a
      click selects an annotation and a drag selects several; they move together and Delete
      removes them. A tool, a second click or hiding the toolbar gives the mouse back to the
      pin (dragging moves it again).
    • Recognize text (OCR) while snipping: O on the monitor under the cursor or on the
      selection or the snip toolbar's OCR button. Snip and recognize text / Snip and
      translate
      (hotkeys hotkeys.ocr / hotkeys.translate, unassigned by default, or tray
      actions) go straight from the chosen region to recognition (and translation of all
      text), without the toolbar. Two offline engines, switched in the bar or in
      Preferences → Snip → Behavior (snip.ocr_engine): Windows OCR (small text recognized
      again enlarged with high-quality resampling; 丨 / 」 inside Latin words read as
      l) and PaddleOCR (PP-OCRv6 small models in ocr_models/, run by the built-in
      Windows ML runtime on the CPU). Words are marked and selected like text (drag, double
      / triple click, Alt+drag box, Ctrl+A); the bar under the area switches the engine and
      the Windows OCR language (snip.ocr_language), joins lines into the paragraphs the
      layout shows (wider spacing, short last lines, indents and list items end one; line-end
      hyphens are joined back) and
      copies; Ctrl+C copies (with nothing selected: everything, also for Copy and Enter,
      shown as "Copied all"; "Nothing to copy" before there is text), Enter copies and
      quits, Esc / right click leaves. The mode's shortcuts show in the snip hint card (it
      makes way for the bar); the bar's status sits in its own tinted segment with a
      coloured dot, divided from the buttons.
    • OCR translation in place: T or the snip toolbar's Translate button (recognize and
      translate at once, also T while choosing a region for the monitor under the cursor),
      and in the OCR mode its bar's Translate button or T, translates the
      selection (or everything) block by block — columns found by a recursive XY-cut (a
      heading over columns too), paragraphs ending where the next line's first word would
      have fitted (text wrapped at any width, hanging indents and pieces of one line kept
      together; line numbers and other lines without letters left out and visible), the
      columns of a speech balloon together — and
      draws each translation over its covered text: speech balloons and buttons (a closed
      region of the text's background colour) are painted over and the translation centred
      in them, flat backgrounds filled, busy ones frosted (blurred and tinted); the font is
      the original's (estimated from character advances: CJK one em, others 0.55 em) with the
      original's line spacing, kept a quarter em inside the area, smaller when that does not
      fit, else the text wraps further down to the next translation or the area's edge (the
      bar then says some text is cut short). While recognizing or translating, the area is
      blurred under a spinner (re-translating keeps the last translation with the spinner).
      A bar (replacing the OCR bar) switches
      original / translation (hold Space too), engine, target and the panel (the translation
      as text, hanging under the bar), copies the text or the translated area as an image (Copy ▾),
      pins the translated area as an image (the panel: its text) and closes (Esc / right
      click). Engines: Opus-MT models in
      translate_models/<source>-<target>/ run by the built-in Windows ML runtime
      (SentencePiece tokenizer, cached greedy decoding), one block per line; and Gemini
      (online, snip.gemini_api_key, model snip.gemini_model, default
      gemini-3.1-flash-lite) with the blocks sent and answered as a JSON object keyed by
      number (enforced by a response schema). Gemini asks once before the first text goes to
      Google (snip.gemini_consent), retries an overloaded model once, gives up after 20 s
      and the panel explains overload, used-up quota and timeouts. The target and engine are
      remembered (snip.translate_target, snip.translate_engine).
    • The OCR and translation bars (with the panel) go where they cover the least recognized
      text — outside the area first, then inside its corners — and can be dragged by their
      grip (⠿) for the rest of the snip.
    • PaddleOCR reads vertical text (columns turned a quarter before reading), and its word
      boxes cover the glyphs (the detector only marks their core).

    Changed

    • The translation panel's text is 10 pt (was 11 pt).
    • Tray icon middle click is configurable (mouse.tray_middle_click); the tray actions
      also offer snip, translate and paste.
    • Defaults: the theme colour is the periwinkle #8080FF (the original's is the blue
      #2080F0), a tray click recognizes text and a middle click translates; settings you
      changed stay.

    Fixed

    • Snip toolbar tooltips no longer pop up over the hidden toolbar (Space).
    • In-place translation: the cover stays inside its region — trimmed where a text box
      reaches past a tab or cell, grown only up to borders and other shades — and the
      background is judged without the recognized text around it, so terminals and documents
      are filled flat rather than frosted; table cells and other text side by side more than
      a line height apart are no longer read as one line.
    • In-place translation keeps the layout: a closed region filling nearly all of its
      bounds (a table cell, a button, a panel) is a box, not a speech balloon, so its text is
      no longer centred; a paragraph keeps its left / centred / right alignment and a single
      line in a box its side of it; text with no word (icons read as letters) is left alone,
      and a translation equal to its source (a name, a path) keeps the original pixels.
    • In-place translation in tight table cells: a block's background is the most common
      colour inside its own box (not the rules around it), the cover is trimmed only by
      one-colour edge lines (never the text itself), horizontal rules (table lines) end
      paragraphs, and a single line may run on over the free background to its right.
    • Menus and lists are no longer merged into one paragraph: a Latin line of one or two
      words is an item of its own (unless it ends on a comma, hyphen or a word such as
      "and", "of", "the"); Gemini is told short paragraphs may be interface labels and words
      them as software does; a single line's free room to the right ignores neighbouring
      lines' boxes grazing its edges.
    Downloads