Image capture with transparent background empty when pasting into Chrome on Windows

• Apr 5, 2018 - 21:04
Reported version
2.2
Type
Functional
Severity
S4 - Minor
Status
needs info
Project

Very oddly specific here:

1) use Image capture tool to define a region
2) make sure "Transparent background" is enabled
3) Ctrl+C
4) go to Google Docs or any other site that allows pasting of images, using Chrome on Windows
5) Ctrl+V

Result: nothing happens. Works fine if transparent background is off, works fine when pasting into other applications, works fine on Linux. Issue seems specific to Chrome / Windows. But FWIW, it works fine in 2.1, at least using the portable app version. Also, Save As from image capture tool is fine, so is File / Export.

Somehow I guess the way we create PNG's with transparent backgrounds via the copy to clipboard is not compatible with Chrome on Windows. No idea if it's our fault or theirs, but again, it worked with 2.1


Comments

I assume due to #209596: Screencapture + Copy + Transparency issue. Looks like in 2.1 we were always forcing transparent to false when copying to clipbaord, so it's not like it really worked there either. So this makes me think that whatever is going wrong, it's not our fault, but either Qt is doing something bad in writing the clipboard, or Chrome in reading it. Whatever the issue is, seems msot programs are OK ith it, but who knows if that's because Chrome is really wrong or if other programs are just being generous.

Apparently it's an issue on macOS too. But I think more investigation is needed here as to what is really going on. The Qt bug report seems to describe a similar scenario but a different end result - transparency not working, as opposed to nothing pasted at all. Apparently some utility reports the clipboard is malformed, which I don't doubt, but is that the Qt bug, or is it something we're doing incorrectly? And is there some other solution?

Status (old) patch (code needs review) fixed
Status fixed

Fixed in branch master, commit 550f6b948d

Fix #271074: Image capture with transparent background empty when pasting into other programs on Windows

This reverts 9572faf374 (master) and bd068f7221 (2.2), the fix for issue
#209596, for Windows only, as Linux /and presumably(?) Mac) is not
affected by this.

Fixed in branch 2.3, commit 06138e39b9

Fix #271074: Image capture with transparent background empty when pasting into other programs on Windows

This reverts 9572faf374 (master) and bd068f7221 (2.2), the fix for issue
affected by this.

hi everybody,
I have the same problem with the latest release.
It does not work if "Transparent background" is enabled, but it does work when "Transparent background" is NOT enabled.
Massimo

Apple builds PCs too... I guess you mean Windows? If so the issue is fixed in 2.3, which is not released yet, but you can test as a development build, you get it via https://musescore.org/en/download#Development-builds, make sure to pick the latest with 2.3 in the name.
The only reason why this issue is still open (or rather "needs info") is because someone claimed that Macs have the same problem, and the fix here is Windows only.

If I am not mistaken, though, it isn't really "fixed" in 2.3 - you still can't get an actual transparent image in your clipboard. The transparency is simply ignored, so the effect is exactly as if you simply turned the option off.

For the record, here is the thread where it is apparently suggested the problem exists on Mac too: https://musescore.org/it/node/271062. Maybe someone who speaks Italian can confirm? Or someone with a Mac can simply test for themselves?