Closed Bug 787769 Opened 10 years ago Closed 10 years ago

Paste copied image from Aurora to Paint.NET v3.5.10 fails


(Core :: Widget: Win32, defect)

17 Branch
Windows 7
Not set



Tracking Status
firefox15 --- unaffected
firefox16 --- unaffected
firefox17 + verified
firefox18 + verified


(Reporter: alice0775, Assigned: bbondy)


(Blocks 1 open bug)


(Keywords: regression)


(1 file)

Build Identifier:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120831042009

Paste copied image to Paint.NET fails

Steps to reproduce:
1. Open and any other image
2. Right click on the image and Select "Copy Image"
3. Start Paint.NET v3.5.10  (Installed from
4. Paste from clip board

Actual results:
 Fail to paste with an error message

Expected results:
 The copied image should be pasted.

Regression window(m-c)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120731073938
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120731191138

Regression window(m-i)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120731035237
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120731051939

0a570be19457	Eddy Bruel — Bug 460969 - Fix image to clipboard code; r=netzen
Assignee: nobody → netzen
Attached patch Patch v1.Splinter Review
Attachment #657710 - Flags: review?(jmathies)
As per:

Requests for CF_DIB should automatically be converted to CF_DIBV5.
But I think the problem with Paint .NET is that it doesn't know that and it looks at the advertised available formats and fails.

All that's needed to fix this bug is just adding the data flavor, but I also added code so that
we explicitly handle the format ourselves without a conversion.  

I noticed without us handling the conversion ourselves, it does fix this bug, but a clipboard viewing program called ClipSpy.exe says CF_DIB data is unavailable. 
Yet it says CF_DIBV5 and CF_DIB is available when Chrome copies images to the clipboard.
So I think us handling both formats explicitly is the best route.

The code style formatting in this file is a bit mixed, so I just did the changes with what the code style should be.
Attachment #657710 - Flags: review?(jmathies) → review+
Closed: 10 years ago
Resolution: --- → FIXED
Comment on attachment 657710 [details] [diff] [review]
Patch v1.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 460969
User impact if declined: Pasting images to some programs that do not support DIBv5 and that do not know that DIB can be requested if DIBv5 is available, will not work
Testing completed (on m-c, etc.): I tried this on today's nightly build and it worked.
Risk to taking this patch (and alternatives if risky): Low
String or UUID changes made by this patch: None
Attachment #657710 - Flags: approval-mozilla-aurora?
Attachment #657710 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Keywords: verifyme
Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/17.0 Firefox/17.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0

Verified on Window 7 using Firefox 17 beta 1 that the copied images are pasted from the clipboard (without any errors) to Paint.NET v3.5.10 (verified by pasting several images using the Paste options from the Edit menu and the keyboard shortcut Ctrl+V).
Marking as verified with 18 b1 as well. No issues while pasting images from Firefox to Paint.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/18.0 Firefox/18.0
mass remove verifyme requests greater than 4 months old
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.