Open Bug 1621200 Opened 4 years ago Updated 2 years ago

pasting image with alpha channel surrounding resulting in black edge

Categories

(Core :: Graphics: ImageLib, defect, P3)

Desktop
Windows
defect

Tracking

()

Tracking Status
firefox76 --- affected

People

(Reporter: lolipopplus, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached file sample & result.zip

STR

  1. copy any image with alpha channel surrounding (use attached image in the zip if you don't have any) into clipboard.
  2. pasting it into input box, like GitHub or even here bugzilla

Actual result:
A black edge occurs on the top (see result.png in the zip).

more sample sites: Twitter and Facebook, maybe also Reddit (not that sure though)

Just to see if it reproduces here.

Can we get a little more detail on how you're copying and pasting the image, so that we can try to replicate this locally?
(Specifically, which program are you copying from and which version of Firefox are you pasting it into?)

Thanks!

Flags: needinfo?(lolipopplus)
Component: General → ImageLib
Product: Firefox → Core
  1. It is from a screenshot tool called Snipaste (https://www.snipaste.com/). I have talked to the author and did test that Chrome works fine. But not all screenshot can be reproducible. Nearly 50-50, manually add similar alpha channel in image tools seems pretty much same.
  2. Both Firefox 73.0.1 and 74 have this issue on Windows. My Windows is Windows 10 1909 18363.693
Flags: needinfo?(lolipopplus)

Just additional info: if you can directly paste image into web textbox instead of opening it from picker, it is more likely to reproduce.

the creator of Snipaste and I did some further talking:

  1. the copying code is QApplication::clipboard()->setImage(image);, which is Qt built-in function (and yes, the program uses Qt and I used the Windows Store version)
  2. we can expect similar result simply by create any format with alpha channel when constructing the image into clipboard
  3. two result images from https://twitter.com/Snipaste indicate that we don't need human-visible alpha channel surrounding
  4. it is not 100% sure it is not the problem of Qt

https://bugreports.qt.io/browse/QTBUG-11463 would suggest that there are known QT issues on Windows with putting alpha-containing things on the Windows clipboard. https://stackoverflow.com/questions/44177115/copying-from-and-to-clipboard-loses-image-transparency suggests that this may not be a QT-specific problem.

We should figure out what flavours of clipboard data the tool you're using (QT and/or that app) supports / puts on the clipboard, and/or find a way to reproduce with e.g. mspaint or other common tools.

Just had further info from the author. If you guys are seeking other apps, Telegram is an alternative for this issue since it also uses Qt.
The STR becomes:

  1. send the sample image to Telegram as image so that it doesn't lose anything
  2. open in it Telegram and copy
  3. use Firefox to paste it into GitHub or Twitter
Attached image another sample.png

Also this is another sample that has problem on Telegram & Firefox. But strange part is it doesn't have alpha channel this time.

Blocks: 1615397
Priority: -- → P3

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: