Images Copied as DIB, PNG, or HTML: Which One Pastes?
By Khushi Yadav
Copy an image from a browser and the clipboard often holds several representations at once: a device-independent bitmap, maybe a PNG blob, and an HTML Format fragment that points at or embeds the picture. The destination app asks for the format it likes best. Paint, Word, and a chat box can therefore paste three different results from one Ctrl+C.
Microsoft Learn documents the standard bitmap formats and the HTML clipboard format. It does not publish a single global “priority list” every app must follow. History, separately, stores text, HTML, and bitmap up to 4 MB, 25 items, unpinned items cleared on restart. A file path (CF_HDROP) is none of those.
This teardown stays on documented formats and on what users can observe.
The formats that usually appear
| Format | Who defines it | What it is |
|---|---|---|
| CF_BITMAP | Standard (value 2) | An HBITMAP. Device-dependent. Microsoft says colors follow the system palette. |
| CF_DIB | Standard (value 8) | BITMAPINFO plus bits in memory. |
| CF_DIBV5 | Standard (value 17) | BITMAPV5HEADER plus color space plus bits. Better for some alpha/color-space cases. |
| PNG | Registered format used by many modern apps | Encoded PNG bytes. Often the best shot at transparency. |
| HTML Format | Registered name "HTML Format" | UTF-8 HTML with fragment markers; may include <img src="...">. |
| CF_HDROP | Standard (value 15) | Paths to files, not pixels. |
Microsoft Learn, clipboard formats: when copying bitmaps, prefer CF_DIB or CF_DIBV5. If only CF_BITMAP is placed, the system can synthesize a DIB when the clipboard is closed. If a DIB is present and a window asks for CF_BITMAP, the system can render one using the current palette. GetClipboardData is where those implicit conversions happen.
Microsoft Learn, HTML: HTML Format is a text format. It is not a PNG. Word likes it because it can keep a link, size attributes, and surrounding markup. The payload starts with a header (Version:, StartHTML, StartFragment, …) and then UTF-8 HTML. A typical browser Copy image fragment contains an <img src="https://...">. Offline, that src dies.
How Windows Treats Rich Text Versus Plain Text. What Happens When You Copy Something on Windows.
Who usually picks what
Observations, not a secret Microsoft table:
| Target | Often prefers | User-visible result |
|---|---|---|
| Paint | DIB / bitmap | Flattened pixels; alpha may become a matte |
| Photoshop | DIB or PNG | Pixel layer; transparency varies |
| Word / Outlook | HTML, then bitmap | Linked or styled image; can break offline if it stored a URL |
| Slack / Teams / Discord | Bitmap or PNG | Inline image; often recompressed |
| Explorer | HDROP only | Ignores pixels. How to Copy an Image So Explorer Gets a File |
| Notepad | Text | Empty, or an HTML/URL string if that is what it asked for |
If Word pastes a picture that later shows a broken-image box, HTML probably won and the src was a remote URL. Use Save image as or Paste Special if the app offers a bitmap choice.
Web Images: Drag From Browser vs Copy vs Save As.
Chat apps that accept a paste then run it through their upload pipeline. The file that lands in the thread is rarely the same bytes that sat on the clipboard. That is compression, not a Windows format conversion.
Paste Special is the user-facing chooser
Some Office apps expose Paste Special. If it lists Bitmap, Device Independent Bitmap, HTML, or PNG, pick explicitly:
- Bitmap / DIB — snapshot, works offline, may lose alpha.
- HTML — may keep layout and a live URL.
- PNG — if listed, usually the transparency-friendly choice.
If Paste Special is missing, paste into Paint as a control. If Paint shows the image and Word does not, Word wanted HTML and got a bad fragment.
Microsoft’s Word/Outlook attach and insert articles treat Insert > Pictures as the file path. When the image must survive offline and print, insert the file. Do not debug a flyer by recopying the same browser image ten times.
History’s “bitmap” is not a format picker
Win+V shows a thumbnail for items it classified as bitmap (and that were ≤ 4 MB). Pasting from history republishes what the history service stored, which may be fewer formats than the original copy. A later paste can look worse than the first Ctrl+V. That difference is expected if history kept a flattened bitmap and dropped the PNG or HTML.
Huge images never join history. Maximum Practical Size for Clipboard Images. Windows Clipboard 4 MB Cap: What Gets Dropped. Why Your Huge Screenshot Never Appears in Win+V.
Enable history with Win+V > Turn on or Settings > System > Clipboard. History still will not list “DIB + PNG + HTML” as separate cards for one copy. It stores what it classified, once.
Unpinned items clear on restart. A pin of a muddy bitmap is not a brand asset.
Transparency and “white box” pastes
CF_DIB historically does not guarantee an alpha channel that every reader honors. CF_DIBV5 can describe alpha; implementations disagree. A registered PNG is the practical workaround many apps added. If a paste gains a white or black background:
- Place or open the original PNG file instead of pasting.
- Try another app as a bridge (not a guarantee).
- Do not assume Win+V will fix alpha. It may have stored the worse representation.
How to Keep Transparent PNGs Transparent Through Paste.
A snip of a glass window is not alpha. Win+Shift+S photographs the composite on screen. The checkerboard in Photoshop is a *display* of alpha, not alpha itself. Snipping the checkerboard produces a checkerboard bitmap.
Files versus pixels, again
Explorer Ctrl+C on logo.png is HDROP. No DIB is required. Photoshop Ctrl+V may ignore it. Open the file or copy pixels. How to Copy an Image File So Photoshop Gets Pixels.
A manager that only stores PNG and then offers HTML on drag-out can recreate the internet-shortcut problem. HTML Drops That Turn Into Useless Internet Shortcuts.
Copying from Photos or the Edge viewer can publish pixels. Copying from Explorer publishes a path. Saying “I copied the image” does not specify which.
A practical order of attempts
When a paste looks wrong, try this sequence instead of recopying blindly:
- Paste into Paint. If Paint is empty, there is no bitmap. The clipboard may be HTML/URL only, or HDROP.
- Paste into Notepad. If a URL or markup appears, HTML or text won. Save the image from the browser instead.
- Paste into Word with Paste Special if available. Choose Bitmap or PNG over HTML for an offline snapshot.
- Save image as or export from the source app, then Insert > Pictures or Place. That bypasses format priority entirely.
Screenshots from Win+Shift+S usually offer bitmap formats and little HTML. They are the cleanest “I want pixels” copy. Browser Copy image is the messiest because it is generous: it tries to please Word and Paint at once.
Managers that strip to one format (PNG only, or text only) change this matrix on purpose. That can be a feature (predictable paste) or a bug (Word loses the table around an image). Say which formats are kept.
What developers should offer (without invented APIs)
Microsoft already said: put CF_DIB or CF_DIBV5 on the clipboard for bitmaps. Offering PNG in addition is a widespread convention, not a standard numbered CF_ constant. Offering HTML Format is correct for rich copy from a page, not for a screenshot of a settings dialog.
This article will not specify undocumented priority integers. Query the target with the formats Microsoft names, and test Paint, Word, and Explorer.
Do not “normalize” an Illustrator or Photoshop copy down to a single bitmap unless the product’s job is screenshots. Creative apps put several representations on purpose. Illustrator Clipboard Preferences That Change Everything.
Worked example: logo from a marketing site
- Right-click the logo > Copy image.
- Ctrl+V into Word. A picture appears. Save the doc, go offline, reopen. The picture is a broken box — HTML
srcwon. - Paste Special > Bitmap. The logo is now pixels. Edges may be soft or matted.
- Back in the browser, Save image as
logo.png. - Word Insert > Pictures. The file is the asset. Paste is retired.
If step 2 had gone into Slack, the upload would have been a recompressed raster. Fine for chat. Wrong for print.
Related reading
- Can You Clipboard a Selection of Mixed File Types?
- Drop Zones: Why the Edge of the Screen Matters
- Why You Cannot Drag Old Clipboard Files Into Explorer
- How to Get a Screenshot Into Photoshop Without Recopying
Sources
- Standard Clipboard Formats (Microsoft Learn) — CF_BITMAP, CF_DIB, CF_DIBV5, CF_HDROP.
- Clipboard Formats (Microsoft Learn) — prefer DIB/DIBV5; system conversions.
- HTML Clipboard Format (Microsoft Learn) — HTML Format structure and UTF-8 exception.
- GetClipboardData (Microsoft Learn) — implicit conversions between some clipboard formats on request.
- Using the clipboard (Microsoft Support) — history keeps text, HTML, and bitmap under 4 MB.
- How to use clipboard history in Windows 11 (Microsoft) — history is a snippet/bitmap picker, not a format inspector.
Khushi Yadav is a B.Tech Computer Science Engineering student interested in technology, software, and exploring practical applications of computer science. She enjoys learning new concepts and contributing to technology-focused projects.
GitHub · LinkedInCopy. Stack. Drop.
Transform your clipboard into an interactive edge shelf. Stack, pin, and drag assets into any app with zero friction.
Download for Windows Get from Microsoft Store
How to Install Guide · First 10 Minutes Guide · Drag & Drop Guide · Edge-Drop vs Win+V · Support
Free · Lightweight · Privacy First