Open LXYan2333 opened 1 year ago
It seems that, in the 'image/png'
mimetype, spectacle append a lot of data after IEND
i.e. the end of the png file. Is it possible to truncate it using copyq?
I tried to use QByteArray::indexOf
and QByteArray::truncate
but they are not avaliable in copyq.
Call dataFormats()
only returns the formats already fetched from the clipboard (available using data()
function), i.e. the data that are used by commands and will be stored in a new item.
To get full format list in the clipboard, you can use:
formats = str(clipboard('?')).split('\n');
Not sure what causes the lag though. Even fetching larger amount of data from clipboard (specifically from the source app - Spectacle in this case) is usually fast without any noticeable lag.
Before creating a new issue, see list of known issues.
Describe the bug when I write a script to handle screenshot captured by KDE spectacle, I found it is extremely lag once I called
hasClipboardFormat('image/png')
.To Reproduce Steps to reproduce the behavior:
serverLog(hasClipboardFormat('image/png'))
copy to clipboard
another minor problem
It is also kinda weired if I call
with spectacle screenshot, it only print out 4 types (3 copyq and one ''image/png"), however if I call
hasClipboardFormat('image/avif')
it returns true.code:
result:
Expected behavior
there should't be that huge lag.
and since it has
image/avif
format it should include in thedataFormats()
.the existance of
image/avif
content can be verified withqdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole
:Screenshots If applicable, add screenshots to help explain your problem.
Version, OS and Environment CopyQ Clipboard Manager 6.4.0 Qt: 5.15.8 KNotifications: 5.101.0 Compiler: GCC Arch: x86_64-little_endian-lp64 OS: Debian GNU/Linux 12 (bookworm)
Additional context KDE with wayland