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

Create a panel to display last 10 images from clipboard stored locally #13

Open
iamhectorsosa opened this issue May 17, 2023 · 4 comments · May be fixed by #60
Open

Create a panel to display last 10 images from clipboard stored locally #13

iamhectorsosa opened this issue May 17, 2023 · 4 comments · May be fixed by #60
Assignees
Labels
enhancement New feature or request

Comments

@iamhectorsosa
Copy link
Collaborator

We think it would be useful to have access to the last 10 images that have been pasted from the clipboard. So I'm figuring that after successfully pasting an image we can store in the local storage. @mateusabelli gave this suggestion:

Hello @ekqt I've never done this before, but I think that you could convert the image to Base64 string and store them in local storage. This way the image is available only on the users browser cache and the app can consume them by accessing local storage and converting the Base64 string back to an image. I hope this helps!

@iamhectorsosa iamhectorsosa added the enhancement New feature or request label May 17, 2023
@iamhectorsosa
Copy link
Collaborator Author

Related to (feat) Alert before paste & screenshot history #1

@mateusabelli
Copy link

Hello @ekqt

I've been thinking about how we can accomplish this feature, I still feel like the local storage idea could work, but after doing a few tests and research I've found out that huge images could take a while to be converted and use up to megabytes each in storage.

I thought about using the browser's native file API, so we can load and reference the images locally from the users drive.

To provide a better UX, we could then take a snapshot the latest state that the user left the image and downscale to a very low res thumbnail and that could be converted to a Base64 string of maybe 30 to 50 kilobyes, along with the settings parameters.

This would allow the user to have the last 10 images with a small preview plus the saved state of them. Please let me know how do you feel about this.

@iamhectorsosa
Copy link
Collaborator Author

Hey, @mateusabelli I'm open for this. Sounds like an interesting proposal, if there is anything I can do to help, please let me know!

@mateusabelli
Copy link

Hey, @mateusabelli I'm open for this. Sounds like an interesting proposal, if there is anything I can do to help, please let me know!

That's cool, thank you for assigning me @ekqt. I'll be opening a draft PR as soon as possible to further test the implementation.

@mateusabelli mateusabelli linked a pull request May 21, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants