Skip to content

perf: File transfer: Don't re-compress pasted PNG images

mjk requested to merge mjk/gajim:dont-recompress-pasted-png into master

Note that this has subtle privacy implications: PNG file data supplied by the source application is sent as-is, including possible metadata, while the user might reasonably assume that only raw pixels are being pasted into Gajim.

This is basically "!942 Lite". It doesn't attempt to do anything with GUI, just optimizes away redundant stuff, making #11489 considerably less serious. There's still a silent delay if the source application takes its time to produce the data, like Firefox does with large (dimensions-wise) images. I think some serious refactoring is needed to alleviate that. Namely, the file transfer dialog needs to be able to receive rich Python objects instead of file URI strings, and likely not using the glib action ABI foos.

Tested pasting from Firefox & Chromium (using this image) and also LXQt's ScreenGrab.

Merge request reports