离线 · 无上传 · 浏览器本地完成Offline · no uploads · runs in the browser
JPG 转 Word——离线、字节原样进包、不做 OCRJPG to Word offline — bytes in, no OCR
和 PNG→Word 是同一条两步链(`jpg>html` + `html>docx`),差别只在源是 JPG:没有透明通道可言,而**图里印着什么这条链一概不知道**。第二步的形态是关键——文档体不是一个一个段落翻译过去的,而是作为 altChunk 附在包里,由 Word 打开时渲染;图片则被打包器从 `<img>` 的 `data:` 里提出来,写成包里一个独立的 base64 媒体部件并重写引用(端到端测试用夹具专属载荷钉住了这条:图在包内可解,渲染它不需要取数)。所以 `.docx` 里没有 data URI 残留,而**像素与你的文件逐字节相同**——中间没有画布、没有再压一次,原本那张照片的压缩代际不会再加一代。`html>docx` 在写出前剥掉一切远程引用,理由是那份标记由 Word 在你机器上渲染,一条远程 `<img>` 就成了别的程序替你发出的请求;内层文档 CSS 也随之进包,版心今天实测约 800 px。这条最容易被误会的是「照片里的字能不能变文字」:**不能**,那需要 OCR,本扩展不带模型与语言包、也不上传任何东西;要文字得另找识别工具,再把结果贴进文档。产出名 `converted.docx`,失败报 `errors.docxGen`。This is the same two-step chain as PNG to Word (`jpg>html` + `html>docx`); the source being a JPEG is the only difference — there is no alpha to speak of, and **whatever is printed in the picture stays unknown to the chain**. The second step decides the shape: the body is not translated paragraph by paragraph but attached to the package as an altChunk that Word renders when the file opens, while the picture is lifted off the `<img>`’s `data:` and written as its own base64 media part with the reference rewritten (an end-to-end test pins that with a fixture-unique payload: the image resolves inside the package and drawing it needs no fetch). So no data URI survives in the `.docx`, and the **pixels are byte-identical to your file** — no canvas, no re-compression, so the photograph does not gain another generation of loss. `html>docx` strips every remote reference first, because Word renders that markup on your machine and a remote `<img>` would become a request issued by another application on your behalf; the inner document CSS goes in with it, its measure measured today at about 800 px. What this page is most often misread as offering: **can the words in the photo become text?** No — that needs OCR, and this extension ships no models or language packs and uploads nothing anywhere; bring your own recognition tool and paste its words in. The output is `converted.docx`, and a failure reports `errors.docxGen`.
这条链路怎么走How the route runs
JPEGJPEG HTMLHTML Word (.docx)Word (.docx)
共 2 步,由扩展的路径搜索自动选出,中间产物不落盘。2 steps, chosen by the extension's own path search; intermediate results never touch the disk.
会保留什么What carries over
- 像素逐字节不变:不解码、不上画布、不再压一次,照片不会再加一代损失Byte-identical pixels: no decode, no canvas, no second compression, so the photo gains no extra generation of loss
- 图片是包里的媒体部件,不是 data URI:Word 从包内解析,渲染它不需要联网The picture is a media part in the package, not a data URI: the reference reads from inside the file, so drawing it takes no request
- 远程引用在写出前剥掉——标记由 Word 在你机器上渲染,请求不该由这条链替你决定Remote references are stripped before writing, because Word renders that markup on your machine — the request is not this chain’s to make
- 文件名进 `alt` 与 `title`(去扩展名、属性转义),产物侧仍带着这个名字Your file name goes into `alt` and `title` (extension dropped, escaped for attribute position), so the artifact still carries it
- 一批最多 200 个文件、单个 100 MB,与其他路线共用同一道闸门Up to 200 files per batch and 100 MB each — the same gate every other route shares
如实说明的限制What it does not do
- 不做 OCR:图里印着的文字不会变成 Word 里的字,这条链连像素都不读No OCR: text printed in the picture never becomes words in the document, because this chain never reads pixels
- 文档体是 altChunk(内嵌 HTML),不是 Word 原生段落:排版与分页由 Word 打开时决定The body is an altChunk — that inner HTML — not native Word paragraphs, so Word decides typesetting and paging when it opens
- 不产生题注、图文样式或可搜索文字层;要那些请在 Word 里补——本扩展没有任何路线能从图里读出文字No captions, picture styles or searchable text layer; add those in Word — no route here can read words out of a picture
- 显示尺寸由内层 CSS 与 Word 页面共同决定,本扩展不给缩放参数Displayed size follows the inner CSS and Word’s page; this route exposes no scaling option
- 类型没被浏览器认出时(例如从 ZIP 解包出来的文件)前缀不是图片类型,Word 那一步会在写出前把 `src` 剥掉,那一格留空When the browser never identified the type — a file unpacked from a ZIP, say — the prefix is not an image type, so the Word step strips `src` before writing and leaves an empty slot
- 想要一页一图的 PDF 请走 JPG→PDF;想要真换格式(WebP / PNG)请走图片转图片那几页For one image per page take JPG to PDF; to actually change format (WebP, PNG) take the image-to-image pages
实操提示Working with it
- 只想放进网页:JPG→HTML 是这条的第一步,产物是 HTML 而不是 .docxTo put it in a web page: JPG to HTML is this route’s first step, and the artifact is HTML, not a .docx
- 想把图塞进 Markdown 笔记:JPG→Markdown 与这条共享第一步To drop the picture into a Markdown note: JPG to Markdown shares this route’s first step
- 要文字版的内容:这需要 OCR,本扩展离线且不带模型,请自行用识别工具For the words inside the picture: that needs OCR, which this offline extension does not ship
常见问题Questions people actually ask
生成的 .docx 里,图片是内嵌还是外链?Is the picture embedded or linked in the .docx?
内嵌,而且不是「以 data URI 内嵌」那种:打包器把那条 data URI 提成包里独立的媒体部件,引用指向那个部件。所以文件拷到别的机器、别的目录,引用读的都是包里那一份,显示它不需要联网。Embedded — and not as a data URI: the packer lifts it into its own media part and points the reference there. So copying the file to another machine or folder still reads the picture from inside the package, and drawing it needs no network.
为什么不直接把照片转成 Word 里的文字?Why not just turn the photo into words in Word?
那需要识别,而这条链不读像素。本扩展是完全离线的:不带 OCR 模型与语言包,也不把图上传给任何服务,所以它交付的是照片本身放进一个 .docx,加上你的文件名。要文字请用识别工具,再把结果贴进文档。That needs recognition, and this chain never reads pixels. The extension is fully offline: no OCR models, no language packs, no uploading your picture anywhere — so it delivers the photograph itself inside a .docx, plus your file name. Run a recognition tool and paste its words in if you need text.
如果打开时 Word 说在转换,会丢东西吗?If Word says it is converting on open, is anything lost?
如果它给了转换提示,那是因为它要把附在包里的这段 HTML 渲染成文档内容;图片本身不走这一步——字节还在同一个部件里。会变的是排版:分页、页边距与图的显示尺寸由那一侧决定,所以两次打开在页面设置不同的情况下可能不一样。A converting notice means it is rendering the HTML fragment attached inside the package into document content; the picture itself does not pass through that step — its bytes stay in the same part. What can move is layout: paging, margins and the displayed size are the reader’s call, so two openings can differ if the page setup changed.
不需要账号,也不需要联网:装好扩展后点图标,在新标签页里打开工作台,文件从磁盘直接选。No account and no network: install the extension, click its icon, and the workbench opens in a new tab reading straight off your disk.
从 Chrome 应用商店安装Install from the Chrome Web Store 安装步骤Install steps GitHub 源码Source on GitHub