Reverse Image Search

作者:refern

应用refern 出品

Find the source and a higher-resolution copy of an image with SauceNAO, IQDB, ascii2d and trace.moe, compare sizes, and import the better file linked to the one you have.

随 refern 提供版本 1.0.0

截图

简介

Find the source and a higher-resolution copy of an image, and import it linked to the item you have.

  • Find Higher-Res / Source... (item menu, single image): sends the item's thumbnail (items.getThumbnail, at most 1000 px, as JPEG) to SauceNAO and IQDB (ascii2d and trace.moe on request) through refern.net.fetch, and shows each match: engine, similarity, the item's size against the match's (for example, Current: 800x600 vs Match: 3200x2400), title, creator and source page.
  • Import & Link: downloads the match's file into the item's folder (imports.enqueueUrls, with the creator, source page and site name, and the item's tags when asked), copies its notes when asked, and cross-references the two items (links.add). Undo link in the card removes the cross-reference it made (links.remove; a link change keeps no undo data in the journal) and undoes the copied notes (changes.undo). The imported file stays: remove it in the library if you do not want it.
  • Search Web Address in Lens / TinEye / SauceNAO...: opens the item's https web address in a browser engine (Google Lens, TinEye, Yandex, SauceNAO). The app asks before it opens each link.
  • Settings: saucenaoApiKey (optional, in the OS credential store; it raises SauceNAO's daily limit) and minSimilarity (default 60%).

Network

The plugin reaches only the hosts in manifest.json: the four engines, and the JSON APIs of Danbooru, yande.re and Konachan. Engines name a post page, not its file; the plugin asks those sites for the post's original file, size and artist, so the match can be imported. A match on any other site can only be opened in the browser.

Build

node plugins/reverse-image-search/build.mjs

Same layout as the Pie Menu: src/search.tsx and src/browser.tsx become dist/search.html and dist/browser.html. dist/ is not committed.

版本历史

  1. 1.0.0需要 refern 1.13.0 或更高版本