RajSolai / TextSnatcher

How to Copy Text from Images ? Answer is TextSnatcher !. Perform OCR operations in seconds on Linux Desktop.
https://textsnatcher.rf.gd/
GNU General Public License v3.0
1.26k stars 45 forks source link

Implement looking up the X11 clipboard for a picture [FollowUp][Enhancement] #9

Closed DistantThunder closed 2 years ago

DistantThunder commented 2 years ago

Premise

Right now, the application relies on XDG standards to call a platform native screenshot tool to provide it with the image to work on.

Limits

That method has shown some limit, and it can be inferred that not all DE/WM would have implemented such standards or would have done so the correct. Although this is not the responsibility of this application, it would be nice to provide end-users with a different way of loading pictures into the application.

Proposal

I thus propose, that the application be able to look at the most recent / top item of the DE clipboard (X11 or Wayland agnostic if possible) and upon a quick check, determine the type of the object there and load it if it's an image in the proper format.

Ideally, this implementation would be non-blocking and asynchronous so as not to block the UI, as some DE framework can make you wait a long time before returning any answer.

RajSolai commented 2 years ago

Thanks a lot for putting time to raise the issue, Looking Image in clipboard seems to be useful for many usecases, I have attached a mockup design, a custom dialog box showing options. Please share your feedback on the dialog design

Screenshot from 2022-02-11 21-43-41

DistantThunder commented 2 years ago

This looks good to me but I wonder if it's necessary to make it a second window? Why not put directly all this in the startup screen?

The "Snatch Now!" dialog then this screen feels unnecessarily to me.

RajSolai commented 2 years ago

True, Having multiple windows might confuse the user and degrade the UX hence instead of a dialog all options are now displayed in the main window itself. I will share a screenshot of implementation.

RajSolai commented 2 years ago

Thanks for your support and feedback Pal, Iam closing this issue as release 2.0.0 included options for image selection and clipboard for OCR Operation.

DistantThunder commented 2 years ago

Thanks to you! Very cool project!