-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Rendering improvements #54
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
- Change: Changed image resampling method from `BICUBIC` to `BOX`. - Original image pixels are much better preserved and blurriness is reduced when upsaling. - Reduced blurriness when downscaling. - Minor performance increase for resizing. - Change: Updated the changelog.
AnonymouX47
added
enhancement
New feature / Improvement suggestion or request
lib
Related to the library (Not to be used anymore)
labels
Jun 19, 2022
- Add: `BaseImage._get_render_data()` now blends the image with the terminal's BG color whenever alpha values are rounded. - Change: Changed the default value of the *round_alpha* parameter of `BaseImage._get_render_data()` to `False`, which is the norm.
- Fix: Cell BG colors equal to the terminal's default BG color are now slightly adjusted to ensure images are properly drawn on Kitty. - Add: Added `BlockImage._is_on_kitty()` to detect if the active terminal is a kitty terminal. - Change: Updated `BlockImage` tests.
AnonymouX47
force-pushed
the
rendering-improvements
branch
from
June 19, 2022 00:54
f59cc00
to
973cede
Compare
- Fix: Corrected the description of disabled transparency. - Add: Implemented the use of the terminal's default BG color for image BG color. - "#" is now a valid value for the *alpha* argument of `BaseImage.draw()`. - Incorporated changes into the CLI and TUI. - Change: Modified `BaseImage._get_render_data()`. - Change: Extended the common format specification. - Change: Updated docstring of `BaseImage.draw()`. - Change: Updated format specification docs. - Change: Updated the description of `-b/--alpha-bg`.
AnonymouX47
force-pushed
the
rendering-improvements
branch
from
June 20, 2022 23:16
c36ce69
to
3fa9842
Compare
AnonymouX47
added
fix
Fixes a bug
block
Related to the 'block' render style
common
Related to the interface common to all render styles
text
Related to the interface common to text-based render styles
labels
Jun 20, 2022
AnonymouX47
force-pushed
the
rendering-improvements
branch
from
June 22, 2022 07:09
3fa9842
to
58fe227
Compare
- Change: Significantly improved formatting performance when padding width is less than rendered width. - Now runs in constant time. - No operation is performed on the rendered image. - Change: Improved formatting performance when padding width is greater than rendered width. - The rendered image is no longer splitted and joined. - Reduced the number of copy operations performed on the rendered image. - ~1.7x faster.
- Fix: Corrected alpha threshold field of the format specifier for the TUI. Broke in 112986e.
- Fix: Alpha pixel data is now correctly rounded when *pixel_data* is `False`. - Change: Optimized processing of image render data when image mode and/or size is/are already in the required form. - Conversion is not performed when the image is already in the target mode. - An image is not resized when it already has the target size. - Change: Cleaned up code. - `(width, height)` -> `size`.
- Add: Added tests for `BaseImage._get_render_data()`.
Conflicts: tests/test_kitty.py
AnonymouX47
added a commit
that referenced
this pull request
Jun 24, 2022
- Fix: Fixed render data computation optimization introduced in #54, commit 6137061. - Add: Added *frame* parameter to `BaseImage._get_render_data()`. - Add: Added tests for render data clean up. - Change: PIL images are now closed much more agressively for better memory management. - Change: Updated render data tests.
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
block
Related to the 'block' render style
common
Related to the interface common to all render styles
enhancement
New feature / Improvement suggestion or request
fix
Fixes a bug
lib
Related to the library (Not to be used anymore)
test
Related to the test suite
text
Related to the interface common to text-based render styles
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.
BICUBIC
toBOX
.BaseImage._get_render_data()
.