Fix bugs and improve robustness across compress pipeline#2
Merged
Conversation
Alyetama
commented
Jun 8, 2026
Owner
- Replace deprecated imghdr (removed in Python 3.13) with PIL-native Image.verify() for image validation
- Fix original_size display truncation: str[:5] slicing produced wrong values for files >= ~100 MB (e.g. 100 MB showed as 10485 kB)
- Fix silent mode crash: sys.stdout = None raises AttributeError on any subsequent print() or isatty() call; redirect to os.devnull instead
- Remove dead code: size_change() bool return was computed but never used for the save/skip decision; simplify to return str only
- Fix size_change total-summary call that indexed change[0] on what is now a plain string
- Merge redundant os.stat() + Path.stat() double-stat into one call
- Add Image.LANCZOS resampling filter to im.resize() for better quality
- Add .webp/.WEBP to directory glob patterns
- Fix compress() return type annotation: Optional[str] -> Optional[Tuple]
- Replace deprecated imghdr (removed in Python 3.13) with PIL-native Image.verify() for image validation - Fix original_size display truncation: str[:5] slicing produced wrong values for files >= ~100 MB (e.g. 100 MB showed as 10485 kB) - Fix silent mode crash: sys.stdout = None raises AttributeError on any subsequent print() or isatty() call; redirect to os.devnull instead - Remove dead code: size_change() bool return was computed but never used for the save/skip decision; simplify to return str only - Fix size_change total-summary call that indexed change[0] on what is now a plain string - Merge redundant os.stat() + Path.stat() double-stat into one call - Add Image.LANCZOS resampling filter to im.resize() for better quality - Add .webp/.WEBP to directory glob patterns - Fix compress() return type annotation: Optional[str] -> Optional[Tuple] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add missing ray dependency to pyproject.toml (was in requirements.txt but not declared, so installed packages wouldn't pull it in and poetry build couldn't resolve it) - Fix entry point: 'rayim:rayim.main' -> 'rayim.rayim:main' (correct module:callable format pointing at rayim/rayim.py:main) - Regenerate poetry.lock via `poetry lock` with all transitive deps - Remove poetry.lock from .gitignore and commit it; the .gitignore already had a comment noting it should be version-controlled, and without it CI resolves from scratch on every run which is fragile Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.