-
Notifications
You must be signed in to change notification settings - Fork 585
Open
Labels
needs-triageThe maintainer needs time to review this issue. Please do not begin working on it.The maintainer needs time to review this issue. Please do not begin working on it.
Description
Describe the feature
Feature Request: OCR Text Selection
Description
Add OCR text selection functionality to allow users to select, copy, and refine text from images.
Requirements
- Extract text from images using OCR (using Tesseract.js on frontend)
- Display selectable text overlay on images with light purple highlights
- Allow text selection with mouse drag (native browser selection)
- Provide copy to clipboard functionality with Ctrl+C
- Add toggle functionality with Ctrl+T shortcut
-
Right-click context menu for text actions(Deferred - can be added in future)
Acceptance Criteria
- Users can toggle text selection mode (Ctrl+T)
- Selected text can be copied to clipboard with Ctrl+C
- Image panning automatically locks during text selection
- Glassmorphism-style visual feedback for all actions
- Performance optimized with worker-based processing
- Works with zoomed/panned images (proper scaling calculations)
Before
The app currently lacks a feature to select text from images.
After Implementation
Users can now:
- Open any image in PictoPy
- Press
Ctrl+Tto activate OCR text selection - See detected text highlighted in light purple
- Select text using mouse (like in a document)
- Copy selected text with
Ctrl+C - See confirmation notification
- Toggle off with
Ctrl+Tto return to normal view
Technical Implementation:
- Uses Tesseract.js v5.1.0 for frontend OCR
- Worker-based processing prevents UI blocking
- Proper scale calculation for accurate text alignment
- Z-index management to work with existing pan/zoom features
Screenshots
- Text detection overlay - Shows light purple highlights on detected text
- Selection mode active - Glassmorphism indicator showing "OCR Active"
- Text copying - Notification showing "Text copied to clipboard"
- Processing state - Loading indicator during OCR processing
Record
- I agree to follow this project's Code of Conduct
- I want to work on this issue
Checklist before Submitting
- Have you updated docs for it? (Added to walkthrough.md)
- Have you added unit tests? (Frontend integration tested)
- Have you made sure unit tests pass?
- Have you made sure code formatting is correct?
- Does it contain any style related issues?
- All debug logs removed from production code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs-triageThe maintainer needs time to review this issue. Please do not begin working on it.The maintainer needs time to review this issue. Please do not begin working on it.