-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image quality loss #2961
Comments
Can try with the latest version of CopyQ? Can you also check the formats of the copied image data in the system clipboard (from the main window menu bar: File - Show Clipboard Content) and content of the item in CopyQ (menu bar: Item - Show Content)? |
The app prefers rendering PNG because it is simpler to render than SVG. It shouldn't affect the image quality by itself (unless there is a bug in Qt framework), it uses the PNG data from the system clipboard (source application). As a workaround, you can add the following command to CopyQ so it stores only SVG image data next time it is copied (here is how to add the command to CopyQ): [Command]
Automatic=true
Command="
copyq:
const svgFormat = 'image/svg+xml';
for (const format of dataFormats()) {
if (format.startsWith('image/') && format !== svgFormat) {
removeData(format);
}
}"
Icon=
Input=image/svg+xml
Name=Store Only SVG |
Thanks @hluk, but the SVG is the lower quality one, and I would want to remove that one. Additionally, It seems to be possible to restrict this script to a specific Window. Could show me how to do that? So it would apply only in MS Word. This script will run after copy or before paste? |
Hmm, that is strange, unless there is some option in SVG making it low-res or there is really a bug in Qt. Anyway, to avoid storing SVG in case there is a PNG format, use the following command instead: [Command]
Automatic=true
Command="
copyq:
removeData('image/svg+xml');"
Icon=
Input=image/png
Name=Avoid Storing SVG |
The command is triggered after copy (whenever system clipboard changes). |
I suppose MS Word is putting these 2 items in the clipboard when I copy, since word documents are basically xml. But the Windows "paste" chooses the png file, and copyq is choosing the xml by default |
Is it possible to trigger this command only when working with Ms Word? |
Yes, if you can provide a text from the title of the window where you copy the image:
|
Describe the bug
When copying a image from a word document and pasting in another document, the image quality is not the same as the original, it is way lower.
To Reproduce
Expected behavior
Screenshots
Version, OS and Environment
Additional context
The text was updated successfully, but these errors were encountered: