Copy-paste of images on macOS converts image data to TIFF.
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox120 | --- | fixed |
People
(Reporter: jfrisby, Assigned: jjaschke)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/109.0
Steps to reproduce:
Right click an image of any sort (PNG, JPG, WebP, etc).
Select "Copy Image".
Go into Messages.app.
Paste the image into a discussion.
Hit send.
Actual results:
The image will be pasted as an uncompressed TIFF file.
This means that the recipient often won't see the image unless they click it to get a QuickLook view of it -- presumably because of the immense size of the resulting TIFF.
In one case, I have a JPG with resolution 1080x1440 (279KB), and the resulting TIFF has resolution 1536x2048, includes an alpha channel, and is 12.6MB.
Expected results:
Image data should be pasted in its preexisting format (as happens with Safari and Chrome and as appears to happen when pasting to other apps such as Signal).
Updated•1 year ago
|
Sounds like a similar issue to bug 1769201. Edgar, do you follow Mirko's work? If yes, do you know something about these kind of issues?
Comment 2•1 year ago
|
||
(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #1)
Sounds like a similar issue to bug 1769201.
No, I don't think this is something related to bug 1769201. This more like an issue with the image data we put into system clipboard.
Maybe something went wrong around https://searchfox.org/mozilla-central/rev/3ede9deb876ad5d6389cb51b371d4a4c8d788deb/widget/cocoa/nsClipboard.mm#594-614.
Updated•1 year ago
|
Reporter | ||
Comment 3•9 months ago
|
||
Any likelihood of this being addressed? It's become a practical problem for me: People I communicate with regularly have started asking me not to send images because they don't like having to download 10+MB every time.
Reporter | ||
Comment 4•7 months ago
|
||
This continues to happen on Firefox 118.0.1. Any chance of this ever being addressed, or am I just going to need to switch back to Chrome?
Comment 5•7 months ago
•
|
||
It could also be related to source image format, could you share the image link, so we could also try it out? Thanks!
Comment 6•7 months ago
|
||
Our macOS widget code always puts TIFF data onto the clipboard: https://searchfox.org/mozilla-central/rev/2f5b657343ce18e4b8a56417f707022550f4b742/widget/cocoa/nsClipboard.mm#659-681
This could probably be fixed by using NSPasteboardTypePNG
instead.
Reporter | ||
Comment 7•7 months ago
|
||
Edgar,
I can confirm that it happens regardless of what type of source image. Or, at least, I'm not aware of any image where it didn't happen.
Assignee | ||
Comment 8•7 months ago
|
||
Previously, images of any kind were converted to TIFF format when copy/pasted into other apps.
Especially with the MacOS Messages app this led to a bad user experience
because the Messages app did not convert the TIFF data to some other (more compressed) image format.
With this patch the image is also added to the pasteboard in PNG format.
This allows the pasting app to choose a more compressed version of the image.
Updated•7 months ago
|
Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/96b71d7bceb2 Add png to pasteboard on MacOS. r=edgar,mac-reviewers,spohl
Comment 10•7 months ago
|
||
bugherder |
Updated•6 months ago
|
Description
•