-
Notifications
You must be signed in to change notification settings - Fork 279
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
feat(clipboard): support readImage
& writeImage
#845
Conversation
read_image
& write_image
readImage
& writeImage
I wish we had 1Password/arboard#103 :( |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@tauri-apps/[email protected], npm/@tauri-apps/[email protected] |
* ``` | ||
* @since 2.0.0 | ||
*/ | ||
async function readImage(): Promise<ClipboardImage<Uint8Array>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should return an instance of Image
from @tauri-apps/image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this case we already have the bytes/width/height and the Image class does note expose an API to directly create an image from those values.. doesn't make much sense to send them back to the rust side...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Image
class should be constructed on the Rust side then added to the resources_table, we only return an RresourceId to JS and construct the Js Image class with it.
Just waiting on the next tauri release to push the image changes :) |
Co-authored-by: Amr Bashir <[email protected]>
Co-authored-by: Amr Bashir <[email protected]>
related issue: