离线 · 无上传 · 浏览器本地完成Offline · no uploads · runs in the browser
BMP 转 Markdown——离线、一行内联、字节原样BMP to Markdown offline — one inline tag, raw bytes
两步:`bmp>html` 把文件的原始字节编成 data URI 放进一个 `<img>`(`alt` 与 `title` 是文件名主干,去扩展名、无名时 `converted`,并做属性转义),`html>md` 再用 Turndown 序列化。实测产物是**一行图片语法**:`body` 里只有那张 `<img>`,样式表在 `<head>` 而序列化只取 `body`,CSS 不会漏进 `.md`;`data:` 前缀是 `image/bmp`(类型被浏览器认出的时候——从 ZIP 解包的文件不带类型,前缀会变成 `application/octet-stream`)。这一路**不重编码、不降尺寸**,所以像素逐字节是你原来那一份。代价有两条,都要说在前面:一,BMP 常常完全不做压缩,再乘上 base64 的 4/3,`.md` 会相当大、而且整段负载挤在同一行里,审阅与 diff 都不友好——真要提交进仓库的文档,外链是更好的形状;二,**显示由阅读器决定**,BMP 的 `data:` 图片在不少 Markdown 阅读器与托管站上并不显示,那种场合请自己写 `` 并把图放在同一目录。想要变小的 BMP 出口通常是 BMP→PDF(图像流压缩存放,幅度看内容,而且那一路会先铺白底);想要能被到处接受的位图,就走 BMP→PNG / JPG / WebP 那几页重编码。全程只有 storage 权限,不联网。Two steps: `bmp>html` encodes the file’s raw bytes into a data URI inside one `<img>` (`alt` and `title` carry the basename of your file, extension dropped, `converted` when there is no usable name, escaped for attribute position), and `html>md` then serialises it with Turndown. Measured, the artifact is **one line of image syntax**: the `<img>` is all the body holds, the stylesheet sits in `<head>` and the serialisation reads only the body, so no CSS leaks in; the `data:` prefix is `image/bmp` when the browser recognised the type — a file unpacked from a ZIP has none, and its prefix becomes `application/octet-stream`. This route does **not re-encode or downscale**, so the pixels are byte-for-byte the ones you had. State the two costs up front. First, BMPs are usually uncompressed, and base64 multiplies that by 4/3, so the `.md` gets hefty and the whole payload sits on a single line that is hostile to review and diffs — for documents that go into a repository, an external reference is the better shape. Second, **display is the reader’s decision**: a BMP `data:` picture does not render in many Markdown readers and hosting sites, so write `` and keep the file alongside when it has to show. For a BMP exit that actually gets smaller there is BMP to PDF, which stores the image stream compressed; for a bitmap everybody accepts, take the re-encoding pages — BMP to PNG, JPG or WebP. All of it on the storage permission, with no network at all.
这条链路怎么走How the route runs
BMPBMP HTMLHTML MarkdownMarkdown
共 2 步,由扩展的路径搜索自动选出,中间产物不落盘。2 steps, chosen by the extension's own path search; intermediate results never touch the disk.
会保留什么What carries over
- 像素逐字节不变:不重编码、不降尺寸,产物负载就是原文件的 base64Byte-identical pixels: no re-encode and no downscale, so the payload is simply the file’s base64
- 自包含的一行图片语法:拷走单个 `.md` 就带着图,不必带附件目录One self-contained image tag: copying a single `.md` carries the picture with it, no attachments folder needed
- `alt` 与 `title` 带你的文件名主干,可继续编辑成有意义的描述`alt` and `title` carry your file’s basename, ready for you to edit into something meaningful
- 样式表不会漏进产物:那一步只取文档 `body`,head 里的 CSS 不参与No stylesheet leaks: the serialisation reads the document body only, leaving the head’s CSS out
- 一批最多 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
- BMP 的 `data:` 图片不一定被显示:不少 Markdown 阅读器与托管站不画它,那种场合请用外链图片A BMP `data:` picture is not guaranteed to render: plenty of Markdown readers and hosting sites will not draw it, so use an external reference there
- 体积最难看的组合:源文件常无压缩,再乘 base64 的 4/3,整段负载还挤在同一行The worst size combination: a usually-uncompressed source times base64’s 4/3, all of it on one line
- 不做 OCR:图里印着的文字不会变成 Markdown 文字No OCR: text printed in the picture never becomes Markdown text
- 类型没被认出时(例如从 ZIP 解包)前缀是 `application/octet-stream`,不是 `image/bmp`When the browser never recognised the type — a file unpacked from a ZIP — the prefix is `application/octet-stream`, not `image/bmp`
- 想要真变小或要被到处接受:BMP→PDF,或 BMP→PNG / JPG / WebP 那几页To actually get smaller or to be accepted everywhere: BMP to PDF, or the BMP to PNG, JPG and WebP pages
实操提示Working with it
- 只想放进网页:BMP→HTML 就是这条的第一步,产物是 HTML 而不是 `.md`To put it in a web page: BMP to HTML is this route’s first step, and the artifact is HTML rather than `.md`
- 要能被到处显示:BMP→PNG / JPG / WebP 重编码,体积也才可能降下来To be displayed everywhere: BMP to PNG, JPG or WebP re-encodes, and only there can the size come down
- 要一份多页文档:BMP→PDF,每张一页、页面按图片尺寸For a multi-page document: BMP to PDF, one page per picture sized to the picture
常见问题Questions people actually ask
我的 .md 里图片位置是空的,是转坏了吗?My .md shows nothing where the picture should be — did the conversion fail?
不一定。转换侧做的是搬运,负载里就是整份 .bmp 的字节;不显示通常是**阅读那一边**不肯画 BMP 的 `data:` 图片(不少阅读器与托管站如此)。先在浏览器里验证这件事有个坑:直接打开 `.md` 只会看到源码,浏览器不会把它当文档渲染——要么把那一行贴进一个 `<img src>` 里试,要么直接走 BMP→HTML 的产物看同一段字节能不能显示,要稳就自己写外链 `` 并把图放同目录。Not necessarily. The conversion only carried: the payload is the whole .bmp’s bytes. A blank usually means the rendering side will not draw a BMP `data:` picture, which plenty of readers and hosting sites do not. Check this the honest way: opening the `.md` in a browser shows you source, not a rendering — paste that line into an `<img src>` instead, or take the BMP to HTML artifact and see whether the same bytes display, and when it must show, write the external form — `` with the file kept alongside.
为什么这个 .md 比我的文档大那么多?Why is this .md much bigger than my document?
两层叠加:BMP 本身常不做压缩,base64 又每三个字节写成四个字符,再加图片语法本身。这一路保证的是字节不动,不是体积。想要小,就得让需要重编码的路线去做——BMP→PNG / JPG / WebP 会把像素重新画一遍,BMP→PDF 则在文档里压缩存放。Two layers stack: BMPs are often uncompressed, base64 writes four characters per three bytes, and the image syntax adds its own weight. What this route guarantees is untouched bytes, not size. To get smaller you must take a re-encoding route — BMP to PNG, JPG or WebP redraws the pixels, and BMP to PDF stores the stream compressed inside a document.
BMP 能当输出格式吗?Can BMP be an output format here?
不能。浏览器不提供 BMP 编码器,所以这套界面里 BMP 只是输入格式——没有任何路线会产出 .bmp。要位图出口请选 PNG / JPG / WebP,要文档出口请选 PDF。No. Browsers do not encode BMP, so in this interface BMP is an input format only — no route produces a .bmp. For a bitmap exit choose PNG, JPG or WebP; for a document exit choose PDF.
不需要账号,也不需要联网:装好扩展后点图标,在新标签页里打开工作台,文件从磁盘直接选。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