-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
iTerm2 inline image protocol support #50
Merged
Merged
Conversation
This file contains 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
- Add: Added `GraphicsImage._get_minimal_render_size()`. - Moved from `KittyImage._render_image()`. - Change: Moved methods applicable to multiple graphics style from `KittyImage` into `GraphicsImage`. - `_get_render_size()` - `_pixels_cols()` - `_pixels_lines()`
- Add: Added `.image.iterm2` submodule. - Add: Added `.image.iterm2.ITerm2Image`. - Add: Implemented support detection for `iterm2` render style. - Add: Added `.exceptions.ITerm2ImageError`.
- Add: Implemented "lines" and "whole" render methods for `iterm2` render style. - Add: Added `_render_method`, `_render_methods`, `_default_render_method` and `_render_image()` to `ITerm2Image`. - Updated `ITerm2Image` docstring.
- Add: Added `ITerm2Image._clear_images()` to clear on-screen images on Konsole. - Add: Added `ITerm2Image._handle_interrupted_draw()`.
- For some styles, support checks also involve terminal identification which is required for certain workarounds. This partially reverts commit f4a1df1.
- Add: Now exporting `ITerm2Image` from `.image`. - Add: Added `iterm2` style to the list of auto-selected styles.
- Add: Added `ITerm2Image` to the docs. - Change: Updated `ITerm2Image` docstring.
- Add: Added "iterm2" choice for `-S/--style`.
- Fix: Implemented a workaround for "whole" render method to work on Wezterm and iTerm2. - Fix: Implemented a workaround to erase text under images on Wezterm. - Add: Added `erase` style-specific parameter. - Add: Added `draw()`, `_style_args` and `_display_animated()` to `ITerm2Image`.
- Add: Implemented support for style-specific format specification. - Add: Added `.image.iterm2.FORMAT_SPEC`. - Add: Added format spec for `erase` style arg. - Change: Updated docstrings.
- Fix: Corrected behaviour of `erase=True` with animations. - Now using the correct formatted image height.
- Add: Added `native` style parameter. - Change: Updated `draw()`, `_display_animated()` and `_render_image()` in `ITerm2Image`. - Change: Updated docstrings.
11 tasks
- Add: Added `stall_anim` style parameter.
- Change: `ITerm2ImageError` is raised for native animation of WEBP images since it's not supported on any of the tested terminal emulators. - Change: Updated docstrings.
- Add: Added `method` style-specific parameter. - Add: Added format spec for `method` and `native` style-specific parameters. - Add: Render method can now be set per render.
Conflicts: term_image/image/kitty.py
- Change: Corrected the overriden value of *stall_native* (to the default) when *animate* is `False`. - Change: Removed *animate* explicit parameter in `ITerm2Image.draw()`. - Change: Updated docstrings.
- Change: Renamed `erase` to `mix` and reversed the logic. - Change: Modified style format spec accordingly. - Change: Changed 'iterm2' text inter-mix policy to erase by default. - Change: Updated docstrings.
- Add: Added a parser for 'iterm2' style-specifc options. - Add: Added 'iterm2' native animation support with `--itn/--iterm2-native` CL option. - Add: Added render method selection of 'iterm2' render style. - Add: Handled style-specific errors.
- Fix: Prevented resending of animation data to `AnimRenderManager` upon consecutive resizes. - Add: Added style-specific format specification for 'iterm2' render style. - Add: Added workarounds for 'iterm2' animation in WezTerm.
- Add: Added ``term_image.TermImageWarning``. - Change: Updated package top-level docstring. - Change: Updated top-level definitions docs.
- Add: ``ITerm2ImageError`` is raised when rendering a native animation with a PIL-sourced image and its format cannot be determined. - Add: Added a maximum size for native animation image data. - Add: ``TermImageWarning`` is issued when rendering a native animation with image data size above the set maximum. - Change: Now reading image data for native animation directly from file when possible. - Significant speedup. - Change: Lifted animation rendered/padding height limitations on native animations. - Change: Updated docstrings.
- Add: Added `--itn-max/--iterm2-native-maxsize` CL option. - Add: Handled native animations with data size above the maximum. - Set a warning filter to turn `TermImageWarning` issued from `.image.iterm2` into an exception and handled the exception.
- Change: Refactored 'iterm2' render method selection code. - Change: Updated CLI help text.
- Change: Image data is now read directly from file when possible and reasonable. - Significant speedup, especially for transparent renders.
- Change: Increased quality of JPEG encoding used for non-transparent renders. - Definitely increases image data size but still much better compressed than with PNG.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cli
Related to the image viewer's CLI (Not to be used anymore)
documentation
Improvements or additions to documentation
enhancement
New feature / Improvement suggestion or request
lib
Related to the library (Not to be used anymore)
tui
Related to the image viewer's TUI (Not to be used anymore)
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.
Implementing #48
iterm2
render style..image.iterm2
submodule.ITerm2Image
class.iterm2
choice for-S | --style
.term_image.TermImageWarning
.--itn/--iterm2-native
and--itn-max/--iterm2-native-maxsize
style-specific CL options for 'iterm2' native animation.