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

[FR] Picture from clipboard #441

Open
Alex9779 opened this issue Nov 1, 2023 · 7 comments
Open

[FR] Picture from clipboard #441

Alex9779 opened this issue Nov 1, 2023 · 7 comments

Comments

@Alex9779
Copy link

Alex9779 commented Nov 1, 2023

I would be really great if pictures for parts could also be inserted from the clipboard.
In combination with the "copy object" (no idea how this is really called, you click a picture in the photos app so that you just see the picutre, then you can click on an object with a force touch and it tries to recognise an object, then you can copy that object which seems to be a PNG in the clipboard) thing on my iPhone this would greatly improve my workflow.

@SchrodingersGat
Copy link
Member

@Alex9779 would be happy for someone to add that feature in. Would you be willing to contribute this?

@Alex9779
Copy link
Author

Alex9779 commented Nov 1, 2023

Me? Oh well my iOS dev skills stopped before Swift came and Flutter is a totally new thing to me...

@Alex9779
Copy link
Author

Alex9779 commented Nov 1, 2023

Ok I tried and somehow it worked, but just with real pictures I copied from the photos app.
I had some troubles with pictures not updating because I have to create a new file from the bytes I get from the pasteboard but with some random file name I got that working.
But the package I use to the get pasteboard data seems not to support the extracted object image data. If inserted somewhere else it is a PNG file, but trying to read it the package fails to get the data...

@SchrodingersGat
Copy link
Member

@Alex9779 sounds like you have made some quick progress! If you make a pull request with the new code I can review, perhaps suggest something

@Alex9779
Copy link
Author

Alex9779 commented Nov 1, 2023

I think the challenge is to find a clipboard package which supports this.
I found another which can deal with images and look more mature but if it can handle that object omage data, no idea.
And it works totally different than the other and I have no idea how to get a file out of it to return.

@SchrodingersGat
Copy link
Member

Which packages have you tried?

@Alex9779
Copy link
Author

Alex9779 commented Nov 1, 2023

I created a draft PR, I tried this package: https://pub.dev/packages/pasteboard
The other reasonable choice could be this one: https://pub.dev/packages/super_clipboard but I have no idea how to get a file out of it...

Up until today I didn't do anything with Flutter or Dart and my iOS dev days are long long ago before the Swift era so...

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