Skip to content
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

ditto messes with the alpha channel of copied graphics #584

Open
Ulf3000 opened this issue Dec 23, 2023 · 6 comments
Open

ditto messes with the alpha channel of copied graphics #584

Ulf3000 opened this issue Dec 23, 2023 · 6 comments

Comments

@Ulf3000
Copy link

Ulf3000 commented Dec 23, 2023

the program is nice , but i cannot use it efficiently for graphics related work where i must retain the alpha channel of copied graphics.

it will fill the alpha channel with black if i paste from ditto to a graphics program.

can you fix that ?

@PzaThief
Copy link
Contributor

You need to describe more information.
For image copy & paste, each application has own process logic. So, please describe where and what did you copy and where did you paste.
Even though it doesn't support CF_DIBV5 yet, CF_DIB already has an alpha value. (You can copy this and paste it into MS Paint 3d or PowerPoint to see it works)

@Ulf3000
Copy link
Author

Ulf3000 commented Dec 29, 2023

CF_DIB already has an alpha value. (You can copy this and paste it into MS Paint 3d or PowerPoint to see it works)

doesnt work if i paste it to clipstudio/photoshop/krita/blender.

CF_DIB supports alpha but ditto overwrites the alpha channel somehow. Same with any content copied from and back into any graphics program.

without ditto it works like it should.
with ditto alpha areas will just fill with black aka the alpha channel is overwritten

theres a competitor to ditto called copyq which handles this correctly , but i like the ui and search from ditto much better. Maybe you can find the missing code in copyq´s repo.

@PzaThief
Copy link
Contributor

Thank you for information, please give me some time. I'll dig it.

@PzaThief
Copy link
Contributor

PzaThief commented Jan 4, 2024

With some tries, I found several things we need to know.

First, Ditto does not messes alpha channel in CF_DIB.
it was Windows behavior. you can find messed image equally with terminate Ditto and use Windows clipboard(Win+v)
nevertheless if program can use other information like CF_HDROP (file information, used to darg&drop), it appears that it works correctly.

However Ditto skips many things we want to keep exclude CF_HDROP.
Even though CF_DIB is messed already, you might feel weird only with Ditto.
Whereas window clipboard has many file format by clip, Ditto only accepts those listed in the 'Supported Types' option tab..
So many of information will be lost include PNG format not listed on the option by default.
Now the paste part program only can receive corrupted CF_DIB.

Now we know solution is just adding supported format, but it seems to common issue to happens so easily.
So I made an experimental PR to avoid this issue. it makes PNG as default support format and use an option to accept all format from clipboard.

Please tell me if you need or just opinion about PR is welcome.
Happy new year~

@Ulf3000
Copy link
Author

Ulf3000 commented May 21, 2024

any update on this ?

@PzaThief
Copy link
Contributor

Nothing to update on this.
But as last my comment, you can use experimental advanced option that "support all types ignoring ~~".
This option makes Ditto not mess any information from copies.
Please try this option and let me know if it helps or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants