Commit Graph
12 Commits
Author SHA1 Message Date
Esa Kataja 84e1a6a82e refactor: consolidate image trimming and standardize processing
- Replace OpenCV-based trim_whitespace with PIL implementation
- Remove redundant trim_whitespace_pil function
- Add initial trim step to extract command
- Standardize image processing to 2048px wide grayscale using Lanczos
2024-12-03 21:47:03 +02:00
Esa Kataja 682a1f13ee fix: Improve transparency handling and optimization levels
- Handle transparency in whitespace trimming
- Use IntEnum for optimization levels
- Add proper level comparisons
- Treat transparent pixels as white for boundary detection
- Preserve transparency in output
- Fix black artifacts in transparent areas
2024-12-03 21:38:55 +02:00
Esa Kataja 6e1d90de2f feat: Add settings module
- Add configuration for parallel processing
- Add optimization settings (optipng level, trim padding)
- Support environment variable overrides
- Add temporary directory prefix setting
2024-12-03 21:15:34 +02:00
Esa Kataja 3d143ce5a2 feat: Add optimize command
- Add whitespace trimming functionality
- Add optional PNG optimization with optipng
- Add progress tracking and error handling
- Improve imports organization
- Add proper docstrings and return values
2024-12-03 21:10:38 +02:00
Esa Kataja 7ef31b4876 docs: Add comprehensive README
- Add project description and features
- Include installation instructions with uv sync
- Add usage examples for all commands
- Document how each processing step works
- Add package installation instructions for different distros
2024-12-03 21:07:39 +02:00
Esa Kataja bad7612027 feat: Add cleanup of temporary files in finalize command
- Remove all temporary PNG files after PDF creation
- Remove temporary directory
- Update command feedback messages
2024-12-03 20:55:56 +02:00
Esa Kataja 9bacbb0dcf feat: Improved deskew to focus on horizontal lines
- Modified deskew function to better detect staff lines
- Added morphological operations to enhance horizontal lines
- Used probabilistic Hough transform for more precise line detection
- Added .png to gitignore
2024-12-03 20:53:17 +02:00
Esa Kataja 0709f93226 Add Ignore png files 2024-12-03 20:52:22 +02:00
Esa Kataja e909445f70 Add pdfs to git ignore 2024-12-03 19:25:30 +02:00
Esa Kataja eb11d95764 feat: Add PDF cleaner with deskew and image enhancement
Features:
- Page deskewing using contour detection
- Image enhancement with edge preservation
- High-resolution output (min 2048px width)
- Black and white conversion with proper contrast
2024-12-03 19:25:02 +02:00
Esa Kataja f5d35b499f feat: Add project structure with README and I/O directories 2024-12-03 19:24:47 +02:00
Esa Kataja fc9d33c3c2 chore: Initial project setup with dependencies 2024-12-03 19:23:58 +02:00