Image capture with transparent background empty when pasting into Chrome on Windows
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
and Macos
https://musescore.org/it/node/271062
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.
Indeed due to that change, see 9572faf374 (master) and bd068f7221 (2.2), before the change, esp. the comment:
Copy from IRC: https://bugreports.qt.io/browse/QTBUG-11463
Pity, but seems we need to revert the earlier fix. Or at least revert it for Windows.
See https://github.com/musescore/MuseScore/pull/3610 (for master, the 1st commit should make it into 2.3 too, even if it won't cherry-pick cleanly due to the changes how preferences are saved)
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?
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 master, commit 8bb019c0b3
Merge pull request #3610 from Jojo-Schmitz/271074-transparent-image-copy-paste
Fix #271074: transparent image copy paste on Windows
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.
As per Shoichi comment above (https://musescore.org/en/node/271074#comment-828592), it is an issue on macOS. And I still say we need more investigation here before rushing into a decision.
As per #271250: Image Capture (2.2.1, Revision 5lb8386) it is not an issue on Mac?
Can someone with a Mac verify whether it is an issue there too?
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
With MuseScore 2.2.1 on a Mac?
No, it is a PC
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?
Indeed. The bug is with Qt it seems, so we have to work around it
https://musescore.org/en/node/273295 seems to indicate the problem exists in Linux too. Confirmation needed...
Edit: not confirmed (or rather: confirmed not to be the issue there)