<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[River Jiang]]></title><description><![CDATA[River Jiang]]></description><link>https://riverjiang.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 00:15:13 GMT</lastBuildDate><atom:link href="https://riverjiang.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to Remove a Video Background and Keep a Real Transparent Video (WebM Alpha, ProRes 4444, or PNG Frames)]]></title><description><![CDATA[Upload a clip, download a verified-alpha WebM for the web and OBS plus a ProRes 4444 master for editors, and check the file before you use it.]]></description><link>https://riverjiang.hashnode.dev/remove-video-background-keep-real-transparency-webm-prores-png</link><guid isPermaLink="true">https://riverjiang.hashnode.dev/remove-video-background-keep-real-transparency-webm-prores-png</guid><category><![CDATA[FFmpeg]]></category><category><![CDATA[Video Editing]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[AI]]></category><category><![CDATA[Design]]></category><dc:creator><![CDATA[river jiang]]></dc:creator><pubDate>Sat, 28 Nov 2026 02:07:04 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/cc9becf8-7f4f-444a-b6be-5c1d528a5256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You exported a video with the background removed. In the editor it looked perfect over the checkerboard. On the web page there is a black box around the person, or the OBS overlay is a solid rectangle, or the clip is fine in Chrome and broken on an iPhone.</p>
<p>Often the cutout is not the problem. "Transparent video" gets used for three different things: the preview you looked at, the alpha channel in the file, and the software that plays it. This guide covers which format actually stays transparent in each destination — WebM with VP9 alpha, ProRes 4444, or a PNG sequence — how to prove the file has alpha, and how to <a href="https://bgremover.online/remove-video-background/">remove a video background online</a> so the download is a real transparent video, not a black-background MP4.</p>
<p>Disclosure: I built BG Remover Online. The format and alpha measurements below were run on 28 November 2026 with FFmpeg 7.1.5, on the site's downloadable demo files. Where I describe OBS, Premiere, Resolve, Final Cut or browsers, I follow the site's own guides.</p>
<h2>What a real transparent video looks like</h2>
<p>A checkerboard in a preview proves nothing. That pattern is how apps draw empty space; if it is baked into the export, you have an opaque video of a checkerboard. What you need is an alpha channel: an opacity value for every pixel, so hair, glass and motion blur can blend into whatever comes next. Many desktop players ignore that channel and show the colour data underneath, which is black wherever the video is empty. A black box therefore has two causes — the file never had alpha, or the player dropped it — and they need opposite fixes.</p>
<p>Here is what a correct result looks like. Top row: the original frame. Bottom row: the transparent cutout, drawn over a checkerboard only so you can see it. The checkerboard is not in the file.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/de6af1df-529f-47e1-8da6-3b4f99e884b5.png" alt="Three original video frames above their transparent cutouts drawn over a checkerboard: a woman with long hair and a raised hand in a park, a woman outdoors in a red top, and a man in headphones in a podcast studio" style="display:block;margin:0 auto" />

<p><em>Demo results from</em> <a href="https://bgremover.online/remove-video-background/"><em>BG Remover Online</em></a><em>. Stock footage:</em> <a href="https://www.pexels.com/video/5972688/"><em>Pexels</em></a> <em>(park),</em> <a href="https://www.pexels.com/video/a-woman-posing-for-a-photo-shoot-outdoors-4825043/"><em>Pexels, Gustavo Fring</em></a> <em>(portrait) and</em> <a href="https://mixkit.co/free-stock-video/bearded-announcer-close-up-2960/"><em>Mixkit</em></a> <em>(podcast). The people shown are not affiliated with the site.</em></p>
<p>The workflow is short: upload a clip, preview the cutout over a grid, a light background or a dark one (those preview colours are not baked into the file), then download a transparent WebM. Every finished video job is decoded and checked for real see-through pixels before the download appears. From the same result you can also export, at no extra cost on clips up to 15 seconds, a ProRes 4444 master for editors, a PNG sequence, a transparent GIF or an animated WebP. New accounts get 5 free credits after Google sign-in, with no card — enough for a 5-second clip or five images.</p>
<h2>Which transparent video format to use</h2>
<p>There is no single file that is transparent everywhere. Most projects use one master and one or two delivery files. This is the map:</p>
<table>
<thead>
<tr>
<th>Destination</th>
<th>Format</th>
<th>Why</th>
</tr>
</thead>
<tbody><tr>
<td>Chrome, Edge, Firefox</td>
<td>WebM with VP9 alpha</td>
<td>Small, and the browsers composite the alpha. <a href="https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Video_codecs">MDN</a> notes that Safari can play VP9 but does not apply its alpha.</td>
</tr>
<tr>
<td>OBS overlays and stingers</td>
<td>WebM with VP9 alpha</td>
<td>Add it as a Media Source; do not add a chroma key filter. The site's guide to <a href="https://bgremover.online/guides/transparent-video-obs/">transparent WebM in OBS</a> walks through overlays and stingers.</td>
</tr>
<tr>
<td>Premiere Pro, After Effects, DaVinci Resolve, Final Cut Pro</td>
<td>ProRes 4444 MOV</td>
<td>Editors read a full-precision alpha plane. WebM support in editors is unreliable.</td>
</tr>
<tr>
<td>Game engines and animation tools</td>
<td>PNG sequence</td>
<td>One RGBA PNG per frame. Large, but nothing depends on a video decoder.</td>
</tr>
<tr>
<td>Safari, iPhone, iPad</td>
<td>HEVC with alpha, or a PNG still</td>
<td>Apple's format; <a href="https://developer.apple.com/videos/play/wwdc2019/506/">WWDC19</a> covers it. This site does not export HEVC alpha, so give Safari a still, or an HEVC file made with Apple's tools.</td>
</tr>
<tr>
<td>Anywhere GIFs work</td>
<td>GIF or animated WebP</td>
<td>GIF edges are stepped; animated WebP keeps soft ones and is usually much smaller.</td>
</tr>
</tbody></table>
<p>An ordinary H.264 MP4 has no alpha channel. Renaming <code>.mp4</code> to <code>.webm</code> does not add one, and neither does any export preset.</p>
<p>On BG Remover Online, every video job returns the WebM first. The ProRes 4444 copy, PNG frames, GIF and animated WebP are optional exports from that same stored result. If you already have a transparent WebM and need an editing master, the <a href="https://bgremover.online/converters/webm-to-prores/">WebM to ProRes 4444 converter</a> does that conversion; the other way, and PNG sequence to WebM, are in the same converter set. Supported HEVC-with-alpha inputs can be converted in, but HEVC is not written back out.</p>
<h3>How large each format is</h3>
<p>I took the first 24 frames (one second at 1080p) of the site's podcast demo, decoded them to RGBA, and encoded each format from the same frames:</p>
<table>
<thead>
<tr>
<th>Format</th>
<th>Size for 1 second</th>
<th>Alpha present?</th>
</tr>
</thead>
<tbody><tr>
<td>WebM, VP9, <code>-crf 32</code></td>
<td>345 KB</td>
<td>Yes</td>
</tr>
<tr>
<td>ProRes 4444 (<code>prores_ks</code>, default quality)</td>
<td>24.7 MB</td>
<td>Yes</td>
</tr>
<tr>
<td>ProRes 422 HQ</td>
<td>14.5 MB</td>
<td>No, fully opaque</td>
</tr>
<tr>
<td>H.264 MP4</td>
<td>289 KB</td>
<td>No, fully opaque</td>
</tr>
</tbody></table>
<p>The WebM is about 70 times smaller than the ProRes 4444 file. That is one clip, one encoder and default settings, so treat the ratio as an order of magnitude. The ProRes 422 HQ row is the common mistake: it looks like the "good" ProRes option, but only 4444 and 4444 XQ carry alpha.</p>
<h2>How to check that a WebM or MOV really has alpha</h2>
<p>The quickest check is visual. Place the actual exported file over a bright solid colour, then over a very different one. If both colours show through around the subject, that app is compositing the alpha.</p>
<p>The <a href="https://bgremover.online/converters/transparency-checker/">free transparency checker</a> does this in the browser. You pick a WebM, MOV, MP4, PNG or WebP; the file stays on your device, nothing is uploaded, and you can switch the colour behind it. It samples three frames — at 10%, 50% and 90% of the clip — and counts how many pixels are actually see-through.</p>
<p>Here is one demo frame on three backgrounds, as a file with real alpha should look:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/66ea7dbd-877b-4b8d-8e2e-d7c9cfe75ee9.png" alt="The same man in headphones cut out and placed over a checkerboard, a navy background and a cream background" style="display:block;margin:0 auto" />

<p><em>One frame of the site's demo WebM, decoded with libvpx-vp9 and composited over three backgrounds. If the file had no real alpha, the three tiles would look the same. Source footage: Mixkit.</em></p>
<p>If you prefer to inspect the file on the command line, <code>ffprobe</code> alone is not enough. A transparent WebM reports plain <code>yuv420p</code> plus a tag:</p>
<pre><code class="language-plaintext">$ ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,pix_fmt:stream_tags=ALPHA_MODE -of default=nw=1 podcast-after-alpha.webm
codec_name=vp9
pix_fmt=yuv420p
TAG:ALPHA_MODE=1
</code></pre>
<p>That is expected. In WebM the opacity lives in a second stream inside the VP9 track, and the tag tells players to look for it. A MOV is simpler: <code>pix_fmt</code> starting with <code>yuva</code> (my ProRes 4444 test file reported <code>yuva444p12le</code>) means an alpha plane is there; <code>yuv422p10le</code> (ProRes 422 HQ) means it is not.</p>
<p>Two further traps are worth knowing, because they produce a "the file is broken" report on a perfectly good WebM.</p>
<p>FFmpeg's built-in VP9 decoder ignores the alpha stream. To read it, put the libvpx decoder <em>before</em> the input:</p>
<pre><code class="language-plaintext">ffmpeg -c:v libvpx-vp9 -i cutout.webm -pix_fmt rgba frame%03d.png
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/c3734132-095d-4739-a5a5-df2bb32a374e.png" alt="The same video frame twice: on the left decoded by FFmpeg's default VP9 decoder with a solid black background, on the right decoded with libvpx-vp9 and shown over a checkerboard with the man cut out" style="display:block;margin:0 auto" />

<p><em>The same file,</em> <code>podcast-after-alpha.webm</code><em>, the 46th of 90 frames. The default decoder reports alpha 255 everywhere (0.0% transparent). With</em> <code>-c:v libvpx-vp9</code> <em>before</em> <code>-i</code><em>, 59.8% of the pixels are fully transparent, 1.5% partly transparent and 38.7% opaque.</em></p>
<p>And the tag alone proves nothing. I saved the same frames as RGB PNGs (no alpha), then encoded them with <code>-pix_fmt yuva420p</code>. <code>ffprobe</code> still reported <code>vp9</code>, <code>yuv420p</code> and <code>alpha_mode=1</code>. The pixels did not:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/462b17b0-9079-4d74-aac6-4ca85704e7fe.png" alt="Two decoded WebM frames over pale lilac: the left one shows the man cut out with lilac around him, the right one shows him inside a solid black rectangle" style="display:block;margin:0 auto" />

<p><em>Both files are tagged</em> <code>alpha_mode=1</code><em>. The one on the right was encoded from frames without alpha, so every pixel is opaque.</em></p>
<p>This command prints the minimum and maximum alpha of one frame. It works for WebM (with the libvpx decoder) and for a ProRes MOV (drop the <code>-c:v</code> flag):</p>
<pre><code class="language-plaintext">ffmpeg -v error -c:v libvpx-vp9 -i cutout.webm \
  -vf "select=eq(n\,45),alphaextract,format=gray,signalstats,metadata=print:file=-" \
  -frames:v 1 -f null - | grep -E "YMIN|YMAX"
</code></pre>
<p>On the good podcast frame it printed <code>YMIN=0</code> and <code>YMAX=255</code>: some pixels are fully see-through, some fully solid. On the tag-only file both were 255. If you get <code>Requested planes not available</code>, the decoder gave FFmpeg no alpha plane: either the file has none, or you used the default VP9 decoder. Pick a frame where the subject is in view, and check more than one — a clip that starts empty will show nothing on frame 0.</p>
<h2>Remove a video background and export a transparent file</h2>
<p>Upload the clip to the <a href="https://bgremover.online/remove-video-background/">video background remover</a>. Input can be MP4, MOV, WebM, M4V or GIF, up to 60 seconds and 200 MB. Anything above 1080p or 30 fps is converted to 1080p 30 fps automatically. The result is a verified-alpha WebM for the web and OBS, with the free ProRes 4444, PNG, GIF and WebP exports on clips up to 15 seconds.</p>
<p>Video costs one credit per started second; high quality, a finer cutout for hair and the gaps between arms and body, uses three. Failed jobs return their credits. Original audio is not kept.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/8ef556cf-23c5-4948-8d5f-4111f5df1340.png" alt="Five frames across one second of a transparent clip over pale lilac: a woman with long hair raising her hand to her head" style="display:block;margin:0 auto" />

<p><em>Frames 1, 7, 13, 19 and 25 of the 25-frame demo clip, composited over pale lilac. Stock video from Pexels.</em></p>
<p>The same upload also <a href="https://bgremover.online/remove-green-screen/">removes a green screen from a video</a>, with no key colour to pick and no tolerance to tune. That helps when the screen is uneven, creased or too dark, when clothing is close to the key colour, or when green light spills onto hair. A well-lit studio key in your editor is still a good option for long, clean green-screen footage: it is real-time and has no length limit.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/a73c7af1-3db8-43c8-a892-732c1fb5db17.jpg" alt="Three frames of a man in a black T-shirt: the original on a green screen, an AI cutout over pale lilac, and a chroma-key cutout over pale lilac with a grey patch left at the lower right" style="display:block;margin:0 auto" />

<p><em>From the site's green-screen test: a 0.97-second</em> <a href="https://www.pexels.com/video/young-man-expressively-speaking-on-green-screen-30400393/"><em>Pexels</em></a> <em>clip. The AI cutout has no green rim on the hair or hand; the best of six FFmpeg</em> <code>chromakey</code> <em>settings left a green edge and a grey patch in the darker corner of the screen. Professional keyers in Premiere, Resolve and After Effects have more controls than that filter.</em></p>
<p>If you already use a design suite, a few names are changing around this workflow. On 28 November 2026, <code>unscreen.com</code> redirected into Canva. <a href="http://remove.bg">remove.bg</a> is also moving into Canva; its <a href="https://www.remove.bg/api">API page</a> says self-serve API access moves to <a href="http://Leonardo.Ai">Leonardo.Ai</a> from 1 December 2026, and its FAQ has the account and credit details. If you want a standalone file — a transparent WebM for a site or OBS, or a ProRes 4444 master for an editor — that is the job this tool is built for.</p>
<h2>Use the transparent video on a website, in OBS, or in an editor</h2>
<h3>On a website</h3>
<p>Use a muted, looping video element and let the page show through:</p>
<pre><code class="language-html">&lt;video src="presenter.webm" autoplay muted loop playsinline width="640" height="360"&gt;&lt;/video&gt;
</code></pre>
<p><code>muted</code> is needed for autoplay, <code>playsinline</code> stops iPhones opening it full screen, and <code>width</code> and <code>height</code> stop layout jumps. Do not put a background colour on the video or its container. For Safari, serve a still image or an HEVC-with-alpha file; the site's guide to <a href="https://bgremover.online/guides/transparent-video-safari/">transparent video in Safari</a> explains why listing both as <code>&lt;source&gt;</code> elements is less predictable than it looks, and includes a small script that picks the right file. If the WebM plays but shows a black box in a desktop app, that is usually the player, not the file: VLC, QuickTime, Windows Media Player and Films &amp; TV ignore WebM alpha. The guide to <a href="https://bgremover.online/guides/why-transparent-video-black/">why a transparent video looks black</a> separates that case from a file that never had alpha.</p>
<h3>In OBS</h3>
<p><a href="https://bgremover.online/guides/transparent-video-obs/">Add the transparent WebM in OBS</a> as a Media Source, or pick it as the video of a Stinger transition. Because the file already carries alpha, you should not add a chroma key filter. If you see a black box, check the file in the transparency checker before changing OBS settings.</p>
<h3>In an editor</h3>
<p>Import the ProRes 4444 MOV and place it on a track above your background. Put a solid colour underneath so you can see the edges. If you only have a WebM, convert it first; do not rename it to <code>.mov</code>. If a dark or light halo appears around hair, the editor may be reading the alpha as the wrong type — straight versus premultiplied. The site measured one half-transparent edge pixel at RGB 255, 182, 139 when read correctly and 192, 152, 129 when a premultiplied pixel was read as straight. The fix is the clip's alpha-interpretation setting, not a re-export. In After Effects, the render output module also has to be set to RGB + Alpha, or the transparency is baked to black.</p>
<h3>In a game engine or design tool</h3>
<p><a href="https://bgremover.online/converters/video-to-png-sequence/">Export a PNG sequence</a> from the transparent video: every frame as an RGBA PNG, zipped. Nothing then depends on a video decoder reading alpha. Conversions of files up to 50 MB and 10 seconds are free, three a day, at up to 1080p 30 fps; larger or full-resolution files use credits.</p>
<h2>Photos, logos and signatures</h2>
<p>The same credits work for stills. The <a href="https://bgremover.online/remove-image-background/">image background remover</a> takes a JPG, PNG or WebP up to 15 MB and returns a transparent PNG, or a white-background JPG for marketplaces, without running the job again. Images are processed one at a time, at one credit each, and most finish in seconds. Animated GIFs can be uploaded as video: the background is removed from every frame and you can export a transparent GIF or an animated WebP from the result.</p>
<p>White around a logo or signature is removed; white <em>inside</em> a mark can stay white, and a faint printed line can stay faint. Check the cutout over a dark background before you use it:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/16433dfe-288d-46cd-9bbb-c0b6bc59a0df.png" alt="A navy and orange BOOKSHOP logo on white beside its cutout on dark grey, with white remaining inside the ring, above a blue signature on paper beside its cutout on dark grey, with a faint signature line remaining" style="display:block;margin:0 auto" />

<p><em>The site's own logo and signature tests, shown over dark grey so any remaining interior white is visible. Both graphics were made for the site, not stock.</em></p>
<p>Hair, motion blur and busy backgrounds are the harder cases for any automatic cutout, which is why the preview lets you switch between light and dark backgrounds before you download. If an enclosed gap — the space between an arm and the body, for example — flips between kept and removed across a couple of frames, you can <a href="https://bgremover.online/converters/video-to-png-sequence/">export a PNG sequence</a>, mask those frames in your editor, and convert the sequence back to WebM. High quality is the setting to try when hair or those gaps need a finer edge.</p>
<h2>Pricing</h2>
<p>Figures below are from the live <a href="https://bgremover.online/pricing/">pricing page</a> on 28 November 2026, in US dollars.</p>
<ul>
<li><strong>Free trial.</strong> 5 credits after Google sign-in, once per person, with no card. That covers five images or a clip of up to five seconds.</li>
<li><strong>Credits.</strong> One credit is one image or one started second of video. A 7.2-second clip uses 8 credits, or 24 in high quality. Failed jobs return their credits.</li>
<li><strong>One-time packs, which never expire.</strong> 60 credits for $6.99, 120 for $12.99, 300 for $29.99.</li>
<li><strong>Monthly plans.</strong> $19 for 180 credits, $39 for 420 and $79 for 900 each month. Plan credits are used before pack credits and reset each billing month. Annual billing is listed as about 17% cheaper.</li>
<li><strong>Converters.</strong> Free for files up to 50 MB and 10 seconds, three a day. Larger files cost 2 credits per started 500 MB.</li>
</ul>
<p>Uploads are stored privately and deleted after processing; finished results stay in your account for 7 days. Details are on the <a href="https://bgremover.online/privacy/">privacy page</a>.</p>
<h2>FAQ</h2>
<p><strong>Does MP4 support a transparent background?</strong> No. Ordinary H.264 MP4 cannot store an alpha channel. Use WebM with VP9 alpha for the web and OBS, ProRes 4444 for editing software, and HEVC with alpha or a still for Safari.</p>
<p><strong>Why is my transparent video black?</strong> Most desktop players ignore WebM alpha and show the colour data, which is black in the empty areas. Open the file in Chrome, Firefox, Edge, OBS, or the <a href="https://bgremover.online/converters/transparency-checker/">transparency checker</a>. If the background shows through there, the file is fine.</p>
<p><strong>Which format should I use in OBS, Premiere, or on a website?</strong> WebM with VP9 alpha for a website and for OBS; ProRes 4444 for Premiere, After Effects, Resolve and Final Cut. The video background remover can give you both from one job.</p>
<p><strong>How do I check that a WebM really has alpha?</strong> Drop it on the transparency checker and switch the background colour, or decode a frame with <code>ffmpeg -c:v libvpx-vp9</code> and confirm that some pixels have alpha 0. <code>ffprobe</code> reporting <code>ALPHA_MODE=1</code> is not enough on its own, and FFmpeg's default VP9 decoder will make a good file look opaque.</p>
<p><strong>How much does it cost to remove a video background?</strong> One credit per started second, or three in high quality. The 5 free credits cover a clip of up to five seconds. Packs start at $6.99 for 60 credits and never expire.</p>
<p><strong>Can I remove a green screen without chroma keying?</strong> Yes. Upload the clip as it is; the model separates the subject from whatever is behind it, green screen or not.</p>
<p><strong>Does this work for images as well as video?</strong> Yes. The same credits run the image background remover, at one credit per image, and return a transparent PNG or a white-background JPG.</p>
<h2>Which format, when</h2>
<ul>
<li><strong>A clip for a website or OBS:</strong> <a href="https://bgremover.online/remove-video-background/">remove the video background</a>, download the transparent WebM, and check it in the <a href="https://bgremover.online/converters/transparency-checker/">transparency checker</a>. Give Safari a still if you do not have an HEVC-with-alpha file.</li>
<li><strong>A clip for Premiere, After Effects, Resolve or Final Cut:</strong> the same job, then the ProRes 4444 export — and confirm the codec is 4444, not 422.</li>
<li><strong>A game engine or design tool:</strong> a PNG sequence from the same result.</li>
<li><strong>A photo, logo or signature:</strong> the image background remover, then check the PNG over a dark background.</li>
<li><strong>Well-lit studio green screen, and a long take:</strong> a key in your editor is reasonable. If the screen fights the key, the same upload works.</li>
</ul>
<p>Judge the file, not the preview or the extension. Once the alpha check, the two-colour test and a check in the destination all pass, the cutout is ready to reuse.</p>
<p><a href="https://bgremover.online/remove-video-background/">Remove a video background</a> — 5 free credits, no card.</p>
<p><em>Image credits: stock footage frames from Pexels and Mixkit as captioned above, via the demo clips published by BG Remover Online; the people shown are not affiliated with it. Cutouts decoded and composited by me with FFmpeg and Pillow.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to Turn an Image or Screenshot into an Editable PowerPoint Slide — and Check That It Really Is]]></title><description><![CDATA[Start from the PDF if you have it, then OCR, a hand rebuild, or a converter: what each route gives you on real files, plus five checks for any PPTX.]]></description><link>https://riverjiang.hashnode.dev/image-to-editable-powerpoint-slide-rebuild-ocr-converter</link><guid isPermaLink="true">https://riverjiang.hashnode.dev/image-to-editable-powerpoint-slide-rebuild-ocr-converter</guid><category><![CDATA[powerpoint]]></category><category><![CDATA[OCR ]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[presentations]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[river jiang]]></dc:creator><pubDate>Fri, 27 Nov 2026 06:11:52 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/ae415a93-f16d-496b-913e-f413a8694791.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You have a slide, but only as a picture. Maybe it's a PNG someone dropped in chat, a page from a PDF export, a slide an image model generated, or a screenshot of a deck whose source file nobody can find. You need to change a heading, fix a number, or move a card.</p>
<p>Putting that picture into PowerPoint gives you a <code>.pptx</code>, but not an editable slide. Insert → Pictures places the whole image as one object. You can resize it, but you can't retype a word in it.</p>
<p>This guide covers the realistic ways out, in the order worth trying them, and ends with five checks for whatever PPTX you get. I ran the tests on 27 November 2026 with LibreOffice 25.2, Tesseract 5.5.0 and python-pptx, not PowerPoint itself. The last check explains why that matters.</p>
<p>Disclosure: I built EditableImage, one of the converters discussed below. I have tried to say plainly where it stops.</p>
<h2>First, decide what "editable" has to mean</h2>
<p>Write down the two edits you actually need before you pick a route. "Editable" is a spectrum:</p>
<table>
<thead>
<tr>
<th>What you need to do</th>
<th>Minimum useful result</th>
</tr>
</thead>
<tbody><tr>
<td>Rewrite a heading or a label</td>
<td>A native text box</td>
</tr>
<tr>
<td>Move a figure or a card</td>
<td>A separate slide object</td>
</tr>
<tr>
<td>Recolour a panel</td>
<td>An editable shape</td>
</tr>
<tr>
<td>Change chart values</td>
<td>Native chart data, or a deliberate redraw</td>
</tr>
<tr>
<td>Change a cell in a table</td>
<td>A table object, or retyping</td>
</tr>
</tbody></table>
<p>The last two rows catch people out: an image doesn't store a chart's data, so no route from pixels gives you an editable PowerPoint chart. If your edit is "update Q3 in the bar chart", plan to redraw the chart from the source numbers with Insert → Chart, whatever else you do.</p>
<h2>Route 0: if a PDF exists, start there</h2>
<p>Many "screenshots" were cut from a PDF export, and a PDF can still carry real text. If you can select a single word in your PDF viewer, the text layer is there and you can skip OCR.</p>
<p>Adobe Acrobat has a documented <a href="https://helpx.adobe.com/acrobat/desktop/save-export-documents/convert-to-other-formats/pdf-to-ppt.html">Convert to PPTX</a> export. For scanned PDFs, Acrobat has a separate Scan &amp; OCR step that adds a text layer. A free option is LibreOffice, which can import a PDF into Impress and save it as PPTX. I tried that on page 10 of the deck used later in this article, with <code>soffice --infilter=impress_pdf_import --convert-to pptx</code>:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/05513d03-9720-4ef2-b923-caaf28a91622.png" alt="A PDF slide imported into LibreOffice and saved as PPTX, with every recovered text box outlined" style="display:block;margin:0 auto" />

<p><em>Slide 10 of "</em><a href="https://commons.wikimedia.org/wiki/File:WikiCite_2025_%E2%80%94_Wikibase,_State_of_the_Cite_%E2%80%94_Ismael_Olea.pdf"><em>WikiCite 2025 — Wikibase, State of the Cite</em></a><em>" by Ismael Olea,</em> <a href="https://creativecommons.org/licenses/by/4.0/"><em>CC BY 4.0</em></a><em>. It was imported with LibreOffice 25.2, saved as PPTX and re-rendered, with text boxes outlined by me. The image is cropped above the event logo.</em></p>
<p>Every word, bullet, tick and cross came back as real characters: 27 text boxes among 48 shapes. The catch is structure. Each bullet mark and each table cell is its own box, and the table is drawn from loose lines, so there's no table object to add a row to. Still, if you have the PDF, this is usually the most accurate starting point. No character has to be guessed.</p>
<h2>Route 1: rebuild it by hand</h2>
<p>Put the image on a blank slide as a reference layer, add text boxes and a real table (Insert → Table), type everything back in, match sizes and colours by eye, crop figures out as pictures, then delete the reference.</p>
<p><strong>What you get:</strong> full control: real bullets, a table that takes new rows, a native chart if you redraw it, and the right font if you know it. Of the routes here, it is the only one that reliably gives you native tables and charts.</p>
<p><strong>What it costs:</strong> every word retyped and every box placed by hand, slide after slide.</p>
<h2>Route 2: OCR the words, then lay them out</h2>
<p>OCR saves the typing, and the common tools are free or already on your machine. Windows Snipping Tool has <strong>Text actions</strong> (<a href="https://support.microsoft.com/en-us/windows/apps/use-snipping-tool-to-capture-screenshots">Microsoft's guide</a>), OneNote has <strong>Copy Text from Picture</strong>, Preview on a Mac has Live Text in supported languages, and Tesseract is the open-source command-line option. Each gives you plain text to paste into PowerPoint.</p>
<p>To see what that plain text looks like, I ran Tesseract 5.5.0 with default settings on a 1280×720 PNG of the same slide. It has a red title, two bullet levels and a small table of ticks and crosses.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/5a426290-62c3-4216-8234-adcf7037b8c5.png" alt="A slide screenshot next to the Tesseract 5.5.0 output, where bullets became letters and ticks became &quot;Vv&quot;" style="display:block;margin:0 auto" />

<p><em>Left: the input, a 1280×720 PNG of slide 10 of "WikiCite 2025 — Wikibase, State of the Cite" by Ismael Olea (CC BY 4.0). It is shown cropped above the event logo, but the OCR ran on the full slide. Right: Tesseract's complete output.</em></p>
<p>The ordinary words came back right, apart from <code>allinfo</code> for "all info". Everything else became text too: bullets became <code>e</code>, <code>°o</code> and <code>©</code>, the arrow after "LOD" became <code>©</code>, ticks became <code>Vv</code>, crosses <code>x</code>, and the logo <code>} wikicite</code>. The table is rows of words separated by spaces, and the red title and bullet levels are gone.</p>
<p>So OCR keeps the words and none of the layout: you are back at Route 1, with the typing done.</p>
<h2>Route 3: let a converter reconstruct the slide</h2>
<p>A reconstruction converter reads layout as well as words. EditableImage, for example, measures each line's position, size, weight and colour, places a text box there, cuts figures and icons out as pictures, and erases the old lettering from the background. Other converters split the work differently, as the comparison below shows.</p>
<p>Here is a real run from the <a href="https://editableimage.com/image-to-editable-ppt">Image to Editable PPT page</a>. The input was an illustrated technical slide generated by an image model, 2202×1244 according to the page.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/8c09e63d-2e7c-4e2e-af0d-be00627ca5c3.png" alt="An illustrated technical slide: the flat original image and the exported PPTX rendered, side by side" style="display:block;margin:0 auto" />

<p><em>The site's before/after preview images, 1280×723 each and unaltered. Left: the flat input. Right: the downloadable PPTX as rendered. It is an AI-generated test slide, not affiliated with the aircraft maker, and its figures have not been checked.</em></p>
<p>The two sides are supposed to look the same; what matters is inside the file. I downloaded that PPTX and opened it with python-pptx, which lists 24 shapes. One is a full-slide picture holding the rebuilt background. The other 23 sit on top of it: 16 text boxes, and 7 pictures for the aircraft drawings, the icons and one arrow. Those 23 are what the page reports as "23 objects, 16 text boxes, 7 pictures". From here on, "text boxes" and "pictures" always mean these objects on top of the background.</p>
<p>In the browser, you upload a PNG, JPG or WebP up to 20 MB, or pick one page of a PDF. You can correct misread words on the canvas before you export the <code>.pptx</code>. The site's sample slide looks like this once loaded:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/7fc8d2ff-8d7f-42b7-9c3a-d1e4f37d028c.png" alt="The EditableImage Image to PPT editor with its sample &quot;The Next Grid&quot; slide loaded and the layers panel on the right" style="display:block;margin:0 auto" />

<p><em>The Image to PPT editor on</em> <a href="http://editableimage.com"><em>editableimage.com</em></a> <em>with the site's sample slide loaded, captured 27 November 2026. As the button says, running a conversion needs a sign-in.</em></p>
<p>Converters differ. My own <a href="https://editableimage.com/guides/screenshot-to-editable-powerpoint-test">three-method benchmark</a> on the EditableImage site put the CC slide above through six converters on their free tiers. Four stopped at a sign-in wall. Two produced files:</p>
<ul>
<li><strong>EditableImage</strong> turned the title and bullets into 5 text boxes, with all 19 of those words spelled as on the slide. It kept the table as one exact picture, so the table's 11 words are right but can't be retyped.</li>
<li><strong>2pptx</strong> (free Standard tier) read all 30 words as text, including the table's. It split them into 22 loose boxes, turned some ticks into letters and read the logo as text.</li>
</ul>
<p>The EditableImage result is a re-run after two fixes; 2pptx's is its first run, and its paid tiers were not tested. Neither produced a table object or kept the deck's typeface. Which trade-off suits you depends on the edit you wrote down at the start.</p>
<p>The practical terms, from the <a href="https://editableimage.com/screenshot-to-ppt">Screenshot to PPT</a> and pricing pages:</p>
<ul>
<li>A free account is required. Each run is one slide (no batch upload) and costs 4 credits; new accounts get 10 credits without a card. The smallest paid pack is $5.99 for 100 credits, and there is a monthly plan.</li>
<li>A run usually takes 45–90 seconds and can be reopened free for 24 hours. A failed run is refunded; uploading the same image again is a new run.</li>
<li><strong>Privacy:</strong> the upload and its result are deleted after 24 hours. The image is processed by third-party AI services. Their own terms govern what they retain, and the privacy page says plainly that it can't promise those services exclude model training. Don't upload anything you aren't allowed to share.</li>
</ul>
<h2>Five checks to run on any exported PPTX</h2>
<p>These checks apply to output from any route, including your own rebuild. The <a href="https://editableimage.com/guides/image-to-editable-powerpoint-five-tests">five-tests guide</a> explains each in more depth. I ran the first four on the technical slide's PPTX.</p>
<h3>1. Do the pieces exist as separate objects?</h3>
<p>In PowerPoint, open the Selection Pane (Home → Arrange → Selection Pane). A rebuilt slide lists its objects one by one; a picture on a slide lists one. python-pptx gives the same list without PowerPoint:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/070d39bf-7b98-4290-b2b1-edeba5c8a99d.png" alt="The exported technical slide with every text box outlined in blue and every picture outlined in orange" style="display:block;margin:0 auto" />

<p><em>Positions read from the PPTX with python-pptx and drawn over the LibreOffice render: 16 text boxes (blue) and 7 pictures (orange). The background picture is not outlined.</em></p>
<p>This shows what the preview hides: the two left-hand aircraft drawings, callout labels included, are a single picture. Changing "FUSELAGE STATION (STA)" means covering it or editing the picture, while each block in the right-hand column is its own text box.</p>
<h3>2. What is underneath when you move the text?</h3>
<p>Drag the title aside. Is the background behind it clean, or is the old title still baked in? I deleted the title and subtitle boxes and rendered the file again:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/ea1c2370-17cb-4b8d-88cf-0f959f0056d6.png" alt="The exported slide next to the same file with its title and subtitle text boxes deleted, showing a clean background" style="display:block;margin:0 auto" />

<p><em>Left: the exported PPTX as rendered. Right: the same file with the title and subtitle boxes deleted. No old lettering is left in the background.</em></p>
<p>A soft gradient is the easy case. On a photo or busy texture the hidden pixels are guessed, so zoom in there.</p>
<h3>3. Can you change the words as words?</h3>
<p>Click into a heading and retype it, then look at the layout as well as the letters. I replaced the subtitle text inside the PPTX and rendered it again:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/626a571b-aef4-4eb1-af5a-92e698325529.png" alt="The slide's header area as exported, and again after the subtitle was retyped, with the shorter line sitting at the left of its box" style="display:block;margin:0 auto" />

<p><em>Top: as exported. Bottom: the subtitle retyped in the file and re-rendered. The words changed and the text kept its font and size. But the paragraph is left-aligned in a box sized for the original line, so the shorter text no longer looks centred.</em></p>
<p>So after any shorter or longer edit, re-centre or resize the box. It's a quick fix if you notice it.</p>
<h3>4. Did the small details keep their meaning?</h3>
<p>Read every number, unit, date, legend entry and footnote against the original. A slide can look right at a glance and still have a <code>1</code> where a tick was, which is what happened to one tick in the 2pptx file above.</p>
<p>Then check the fonts. An image carries letter shapes, not a font file, so converters set the text in a close match. In this file that's Arial. If your deck uses a brand font, apply it afterwards and see where headings re-wrap.</p>
<p>This matters more for CJK slides. The site's Chinese test slide came back with its headings and bullets in 9 text boxes and the frames and icons as pictures, set in Microsoft YaHei. A Mac or Linux machine without that font will substitute another, so check line breaks on the machine that will present. The site notes the heading's outlined style was lost.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/668d5066-f4dd-4df8-ae4e-a65de24b3a8a.png" alt="A Chinese slide with decorative frames: the original image and the exported PPTX rendered" style="display:block;margin:0 auto" />

<p><em>The site's Chinese slide run, 1280×714 previews, unaltered. In the downloaded file, python-pptx lists 9 text boxes and 6 pictures on top of the background picture.</em></p>
<h3>5. Does it survive the round trip?</h3>
<p>Open the downloaded file in the app your team actually presents from: PowerPoint, Keynote, or Google Slides via import. Make one text edit and one layout edit there, and view the slide at 100%. A browser preview, or a LibreOffice render like mine, shows the structure without proving how your app will lay it out.</p>
<h2>When the result is wrong</h2>
<ul>
<li><strong>A misread word or number:</strong> correct it in the editor before export, or retype it in PowerPoint.</li>
<li><strong>Text left inside a picture</strong> (a table, a chart, labels on an illustration): retype that piece over the picture. Otherwise rebuild it natively: Insert → Table for tables, Insert → Chart from the source data for charts.</li>
<li><strong>Small or blurry text misread everywhere:</strong> fix the input, not the output. Capture one slide at 100% zoom as a PNG rather than a chat-app copy, or go back to Route 0 and use the PDF.</li>
<li><strong>The tool failed outright:</strong> keep the original image so you can fall back to Routes 0–2.</li>
</ul>
<h2>When the destination isn't PowerPoint</h2>
<p>Sometimes a slide is the wrong target. Here are the other EditableImage tools I'd reach for, and where each one stops.</p>
<ul>
<li><strong>A diagram you need to keep editing.</strong> On a rebuilt slide an arrow can come back as a picture, as one did above, so boxes and lines won't move together. <a href="https://editableimage.com/image-to-drawio">Image to Draw.io</a> returns a <code>.drawio</code> file of shapes, labels and connectors bound to the shapes they join, which opens in <a href="http://draw.io">draw.io</a> or <a href="http://diagrams.net">diagrams.net</a>. Crossing lines and faint arrowheads are where it is least sure, so re-check every connector.</li>
<li><strong>Artwork that has to go to a designer.</strong> For a poster or an AI illustration, <a href="https://editableimage.com/image-to-layers">Image to Layers</a> moves the subject, objects and writing onto separate transparent layers over a rebuilt background and exports a layered PSD. Each layer is redrawn and the writing is pixels, not live type, so compare fine detail.</li>
<li><strong>Just the words, with their structure.</strong> <a href="https://editableimage.com/image-to-text">Image to Text</a> returns Markdown that keeps headings and lists, for text you only need to quote or translate. Chart labels are marked as a picture, not transcribed, and for plain words the free OCR tools in Route 2 may be enough.</li>
<li><strong>The same image with one word changed.</strong> If the slide only has to look right but one word is wrong, EditableImage's Edit Text in an Image tool redraws only the lines you mark and, by default, keeps every other pixel from your original. The result is a PNG, not a PPTX.</li>
</ul>
<h2>Which route, when</h2>
<ul>
<li><strong>You have the PDF:</strong> Route 0. Export or import it, then tidy the fragments.</li>
<li><strong>One slide, an exact font, or a real table or chart is needed:</strong> rebuild by hand.</li>
<li><strong>Many text-heavy slides, and you have time to lay them out:</strong> OCR, then rebuild with the image beside you.</li>
<li><strong>Slides that survive only as images, and the next edit is a title, a label or a moved figure:</strong> a converter, then the five checks.</li>
<li><strong>The slide only has to look right:</strong> insert the picture. That is a legitimate answer.</li>
</ul>
<p>Whichever route you take, judge it by the file, not by the preview or the <code>.pptx</code> extension. Keep the original image open beside it until the five checks pass.</p>
]]></content:encoded></item><item><title><![CDATA[How to Export a Mermaid Diagram to PNG, SVG, or PDF — and Fix What Won't Render]]></title><description><![CDATA[Official Live Editor, mermaid-cli, and a browser workflow, plus the syntax mistakes that block a download and the format choices for Word, slides, and…]]></description><link>https://riverjiang.hashnode.dev/export-mermaid-diagram-png-svg-pdf-fix-render-errors</link><guid isPermaLink="true">https://riverjiang.hashnode.dev/export-mermaid-diagram-png-svg-pdf-fix-render-errors</guid><category><![CDATA[mermaid]]></category><category><![CDATA[MermaidJS]]></category><category><![CDATA[documentation]]></category><category><![CDATA[SVG]]></category><category><![CDATA[PNG]]></category><dc:creator><![CDATA[river jiang]]></dc:creator><pubDate>Thu, 26 Nov 2026 12:40:44 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/f64d99fc-6f2b-4387-93cb-b33dd1cfce56.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Mermaid is plain text. The file you actually need is often an image or a PDF: a figure for Word, a slide with no white box around it, a README on a host that will not render a <code>mermaid</code> fence, or an attachment a reviewer can open without a live editor.</p>
<p>A screenshot of the preview is the usual shortcut, and it is usually the wrong file. The preview is drawn at the size of your screen. The destination then resizes and compresses it. Thin arrows and small labels go first.</p>
<p>This guide covers the three practical ways to export — the official <a href="https://mermaid.live/">Mermaid Live Editor</a>, the official mermaid-cli, and a browser exporter for one-off work — then the format decision, the syntax errors that prevent any export at all, and what to do once the file has a destination. I re-ran the examples below with <code>@mermaid-js/mermaid-cli</code> 12.2.0 (its <code>mermaid</code> dependency reported 12.3.0) on 2026-11-26.</p>
<p>Disclosure: I built Mermaid Online, an independent editor and exporter. It is not the official Mermaid project and is not affiliated with Mermaid.js or Mermaid Chart.</p>
<h2>Start with source that actually parses</h2>
<p>Everything later in this article uses this flowchart. Labels that contain punctuation are wrapped in double quotes. That is not style; it is what keeps the parser from treating a <code>(</code> or <code>?</code> as syntax.</p>
<pre><code class="language-mermaid">flowchart LR
  Author["Write Mermaid source"] --&gt; Preview["Preview in an editor"]
  Preview --&gt; Check{"Looks right?"}
  Check --&gt;|no| Edit["Fix labels or edges"]
  Edit --&gt; Preview
  Check --&gt;|yes| Format{"Where will it live?"}
  Format --&gt;|docs or README| Svg["Export SVG"]
  Format --&gt;|slides, chat, or Docs| Png["Export PNG at 2x or 4x"]
  Format --&gt;|review or print| Pdf["Export PDF"]
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/3ab20a47-acdd-4987-b1e7-252bcd18ec5b.png" alt="" style="display:block;margin:0 auto" />

<p><em>The same flowchart, exported with mermaid-cli 12.2.0 (</em><code>-s 2</code><em>, default theme). Labels that need punctuation are quoted so the parser accepts the source.</em></p>
<p>If this block does not render in your editor, stop and fix the source. There is no honest export of a diagram the parser rejected.</p>
<h2>Pick the format before you pick the tool</h2>
<p>Both SVG and PNG can come from the same Mermaid source. The useful question is where the file will live.</p>
<p><strong>SVG</strong> is vector. It stays sharp at any zoom and is usually the better fit for documentation sites, wikis, and GitHub READMEs that display a committed <code>.svg</code>. Mermaid's own SVG has no canvas fill, so the page or slide behind it shows through unless you add a background.</p>
<p><strong>PNG</strong> is the compatibility default. Use it for slide decks, chat, email, issue trackers, Google Docs, and any editor that rejects or mishandles SVG. Export at 2× for inline documents and at 4× for full-screen slides if your tool offers a scale. A 1× PNG has no spare pixels once the destination resizes it.</p>
<p><strong>PDF</strong> is for handoff and print-style review, when the recipient expects a document rather than an editable source file. mermaid-cli writes PDF directly (<code>-o diagram.pdf</code>). For the flowchart above, <code>-s 2</code> produced a one-page PDF 1.4 file of 79,483 bytes. A Markdown document with several diagrams is a different job: render the diagrams first, then convert the document.</p>
<p><strong>JPG</strong> is a last resort. It cannot store a transparent background, and compression artefacts show up quickly on text and connectors. Prefer PNG unless a form will not accept anything else. WebP is worth it only when the destination is a website that benefits from a smaller file.</p>
<p>For slides on a branded or dark background, export a transparent PNG (or SVG, if the slide tool accepts it). mermaid-cli defaults to a white background; pass <code>-b transparent</code> to turn that off. JPG and many PDF pipelines will flatten transparency to white anyway.</p>
<h2>Three ways to get the file</h2>
<h3>1. Official Mermaid Live Editor</h3>
<p>The official getting-started guide is on <a href="https://mermaid.js.org/intro/getting-started.html">mermaid.js.org</a>. The editor is <a href="https://mermaid.live/">mermaid.live</a>.</p>
<p>Paste the code into the Code panel, confirm the preview, then use the <strong>Actions</strong> section. Official docs list three save options: export PNG, export SVG, and export as Markdown. The current editor also lets you set PNG size to Auto or to a fixed width or height. If the image will be resized later, prefer a larger raster than the on-screen preview.</p>
<p>This is the right path for a single diagram. It is the wrong path for a folder of <code>.mmd</code> files that should be regenerated on every docs build.</p>
<h3>2. mermaid-cli, when the render has to be repeatable</h3>
<p><a href="https://github.com/mermaid-js/mermaid-cli"><code>@mermaid-js/mermaid-cli</code></a> is the official command-line interface. The executable is <code>mmdc</code>. With <code>npx</code>, pass <code>-p</code>, because the package name and the command name are different:</p>
<pre><code class="language-bash">npx -p @mermaid-js/mermaid-cli mmdc -i diagram.mmd -o diagram.svg
npx -p @mermaid-js/mermaid-cli mmdc -i diagram.mmd -o diagram.png -s 2 -b transparent
npx -p @mermaid-js/mermaid-cli mmdc -i diagram.mmd -o diagram.pdf -s 2
</code></pre>
<p>Two flags are easy to mix up. In 12.2.0, <code>mmdc -h</code> describes them this way:</p>
<ul>
<li><code>-s</code> / <code>--scale</code> is the Puppeteer scale factor. The default is <code>1</code>. <code>-s 2</code> is the 2× raster.</li>
<li><code>--size</code> is not a 2×/4× multiplier. It tries to cap the maximum width or height of the output.</li>
</ul>
<p>For the flowchart in this article, the PNG results were:</p>
<table>
<thead>
<tr>
<th>Command</th>
<th>Output I measured</th>
</tr>
</thead>
<tbody><tr>
<td><code>-s 1 -b transparent</code></td>
<td>784 × 206 px, RGBA, 19,968 bytes</td>
</tr>
<tr>
<td><code>-s 2 -b transparent</code></td>
<td>1,568 × 412 px, RGBA, 45,369 bytes</td>
</tr>
</tbody></table>
<p>The 2× file is exactly twice the width and height. That is the point of <code>--scale</code>.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/a8bf35ab-1346-498d-bda6-1b5726e24636.png" alt="" style="display:block;margin:0 auto" />

<p><em>One source file, four official mermaid-cli themes (</em><code>-t default</code><em>,</em> <code>forest</code><em>,</em> <code>dark</code><em>, and</em> <code>neutral</code><em>), each at</em> <code>-s 2</code> <em>with a transparent background.</em></p>
<p>mermaid-cli can also walk a Markdown file, write an image for each fenced block, and rewrite the fences to image links. I ran this on a short document with one flowchart and one sequence diagram:</p>
<pre><code class="language-bash">npx -p @mermaid-js/mermaid-cli mmdc -i two.md -o two-out.md
</code></pre>
<p>The output replaced both fences with <code>![diagram](./two-out-1.svg)</code> and <code>![diagram](./two-out-2.svg)</code>. You can then convert <code>two-out.md</code> with your usual Markdown-to-PDF or docs toolchain. If you need PNG instead of SVG in that rewrite, set <code>--outputFormat=png</code>.</p>
<p>The CLI drives a headless Chrome via Puppeteer. If the first run cannot find a browser, point it at a Chrome already on the machine, or use the project's Docker image (<code>minlag/mermaid-cli</code> or the GitHub Container Registry image). Test the command in the environment you will actually use.</p>
<h3>3. A browser exporter, for a preview-and-download loop</h3>
<p>When you want to adjust padding, background, or scale and immediately download a file, a browser editor is often faster than installing Node.js. The official Live Editor already covers a basic PNG or SVG download. Independent tools exist as well.</p>
<p>The <a href="https://mermaidonline.org/mermaid-to-png">Mermaid to PNG</a> page is the one I maintain: paste the source, preview it, and download PNG, SVG, PDF, or another format. The core editor and export run in the browser and do not require an account. That is the path I use for one-off docs and slides. It is not a substitute for mermaid-cli in CI.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/dc550a2c-866f-4b60-b491-f4d449fdcf0c.png" alt="" style="display:block;margin:0 auto" />

<p><em>The Mermaid to PNG page on</em> <a href="http://mermaidonline.org"><em>mermaidonline.org</em></a><em>, captured 2026-11-26 (Beijing time / Asia/Shanghai). This is the site's default sample in the editor, with the live preview and the export panel (2× selected, Download PNG) in the same view.</em></p>
<p>The site also publishes its own styled export samples. Here are six of them, unaltered, from the theme gallery:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/46db2d11-0ffe-4144-856d-d298a8af48a6.png" alt="" style="display:block;margin:0 auto" />

<p><em>Unaltered preview images from</em> <a href="http://mermaidonline.org"><em>mermaidonline.org</em></a><em>: Clean Docs, Aurora Noir, GitHub README, Whiteboard Sketch, Champagne, and Emerald Suite.</em></p>
<h2>Why the screenshot looks soft</h2>
<p>A screenshot captures the pixels on your display, not the diagram's natural size. If that capture is already close to the width of a README or a slide slot, the platform has no spare resolution when it scales the image. SVG avoids the problem. A 2× or 4× PNG gives the platform pixels to spend.</p>
<p>You cannot recover that detail by upscaling a blurry screenshot. Go back to the Mermaid source and export again.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/947b6bce-fe18-40a1-a49f-7b594980cc86.png" alt="" style="display:block;margin:0 auto" />

<p><em>Both panels show the article flowchart at the same width. On the left, the 1× mermaid-cli PNG has been scaled up; on the right is the native</em> <code>-s 2</code> <em>file. The zoom makes the missing pixels obvious.</em></p>
<h2>When the preview is red: errors that block export</h2>
<p>A surprising number of "export" problems are parse problems. The six below all failed under mermaid-cli 12.2.0 in the way described, and the repaired form rendered. A longer checklist lives on the <a href="https://mermaidonline.org/mermaid-syntax-checker">Mermaid syntax checker</a> page.</p>
<p><strong>The Markdown fence came with the paste.</strong> A <code>.mmd</code> file that started with <code>```mermaid</code> failed with <code>UnknownDiagramError: No diagram type detected</code> and showed the fence in the message. Strip the fence. The first token has to be the diagram type (<code>flowchart</code>, <code>sequenceDiagram</code>, and so on). In a Markdown file, the fence belongs around the block, not inside the Mermaid source.</p>
<p><strong>A label contains unquoted punctuation.</strong> This does not parse:</p>
<pre><code class="language-plaintext">flowchart LR
  A[Start (init)] --&gt; B[End]
</code></pre>
<p>mermaid-cli stopped on line 2 with <code>got 'PS'</code> — the unquoted <code>(</code>. Quote the label:</p>
<pre><code class="language-mermaid">flowchart LR
  A["Start (init)"] --&gt; B[End]
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/8bd15caa-4289-47ad-99f3-dcd4ee2ffa9e.png" alt="" style="display:block;margin:0 auto" />

<p><em>Left: the syntax checker on</em> <a href="http://mermaidonline.org"><em>mermaidonline.org</em></a><em>, captured after pasting the unquoted</em> <code>(init)</code> <em>example — it reports the same</em> <code>got 'PS'</code> <em>error mermaid-cli returned. Right: the quoted form, rendered with mermaid-cli at 2×.</em></p>
<p>The same quoting rule covers <code>?</code>, <code>%</code>, commas, and other characters that the flowchart grammar treats as syntax. This is also the fix most often recommended on Stack Overflow for "special characters" in node text.</p>
<p><strong>The arrow belongs to a different diagram type.</strong> <code>-&gt;&gt;</code> is sequence-diagram syntax. Inside a flowchart it failed on line 2 with <code>got 'MINUS'</code>. Use <code>--&gt;</code> in a flowchart, and keep <code>-&gt;&gt;</code> for <code>sequenceDiagram</code>.</p>
<p><strong>A node is named</strong> <code>end</code><strong>.</strong> <code>end</code> closes blocks such as <code>subgraph</code>, so it is not a valid node id. This failed on line 2 with <code>got 'end'</code>:</p>
<pre><code class="language-plaintext">flowchart TD
  start --&gt; end
  end --&gt; done
</code></pre>
<p>Rename the node, for example to <code>finish</code>.</p>
<p><strong>A subgraph was never closed.</strong> A three-line file with <code>subgraph S1</code> and no <code>end</code> failed, asking for <code>end</code>. mermaid-cli reported the error on line 5, past the end of the file. The reported line is not always the line you forgot to close. Read upward from the token Mermaid named.</p>
<p><strong>The first word is mangled.</strong> <code>sequencequenceDiagram</code> failed with <code>UnknownDiagramError: No diagram type detected</code>. Because the first token selects the diagram family, a typo there produces a type error rather than a useful line error. This shows up often in model-generated code. Fix the opening keyword before you touch anything else.</p>
<p>A green parse is still not the finish line. I have had a deployment flowchart parse cleanly with a <code>yes</code> branch out of a test diamond and no <code>no</code> branch at all. That is not a Mermaid error; the parser cannot infer your release policy. I walked through that exact case in <a href="https://dev.to/river_jiang_670cccce7d97d/the-mermaid-flowchart-rendered-but-the-failure-path-was-missing-24e3">The Mermaid Flowchart Rendered—but the Failure Path Was Missing</a>. When the preview turns green, look at the arrows and ask what a teammate would do if they followed only the diagram.</p>
<h2>Once you have a file, match it to the destination</h2>
<p><strong>GitHub README and other docs that render Mermaid.</strong> Prefer the fenced source. Reviewers can diff an edge the same way they diff a sentence. Hosts do not all bundle the same Mermaid version, though, so a diagram that renders in a current editor can fail in a README that ships an older parser. If you hit that mismatch, commit an exported SVG or a 2× PNG and keep the source beside it.</p>
<p><strong>Microsoft Word.</strong> Word does not render Mermaid source as a diagram, so you insert an image. Current Microsoft 365 and Word 2016 or later can take SVG, which stays sharp in print. If the document will be passed through older Word or messy email round-trips, a 2× PNG is the safer default. The steps are in the <a href="https://mermaidonline.org/mermaid-in-word">Mermaid in Word</a> guide: export, then Insert → Pictures. Keep the Mermaid source; Word will treat the figure as a picture, not as editable diagram text.</p>
<p><strong>Slides.</strong> Export a transparent PNG at 2× or 4× so the diagram sits on a branded background without a white rectangle. Check contrast: a light theme on a dark slide can make labels disappear even when the canvas is transparent.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b08205feff825bae3f3e211/c5d8a375-fd4c-454c-8faf-23879a4a47d4.png" alt="" style="display:block;margin:0 auto" />

<p><em>Exported with</em> <code>mmdc -t dark -s 2 -b transparent</code> <em>and placed on a dark background. There is no white box around the diagram; the labels still have to contrast with whatever the slide provides.</em></p>
<p><strong>Obsidian.</strong> Keep the <code>mermaid</code> fence in the note while you edit — it stays text, diffs with the rest of the vault, and follows your theme. When the diagram has to leave the vault (a Word doc, a chat message, a slide), copy the code out and export a PNG or SVG. A theme-colored screenshot will look different in every vault; an export will not.</p>
<p><strong>A whole Markdown file to PDF.</strong> Do not expect Pandoc or a Markdown-to-DOCX tool to render Mermaid fences on its own. Use mermaid-cli to replace the fences with rendered images, as in the <code>two.md</code> example above, then run your usual converter on the rewritten file.</p>
<h2>What to keep</h2>
<p>Keep the Mermaid source, always. The image is an output. When the host can render Mermaid, the source is the document. When it cannot, commit the export and the <code>.mmd</code> (or the original fence) together so the PNG is not the only copy.</p>
<p>None of these tools replace the official Mermaid project. mermaid-cli and the Live Editor are official. Mermaid Online is one independent option for the same source-to-file step. Use the path that matches the job: a single download, a repeatable build, or a quick preview — and fix the parse errors before you worry about scale.</p>
]]></content:encoded></item></channel></rss>