-
Notifications
You must be signed in to change notification settings - Fork 9k
Improve quality of GDI image scaling #18495
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
Conversation
|
I should mention there is also a |
DHowett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks perfect to me. Thanks!
lhecker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
|
/azp run so tired of this new policy already |
|
Command 'run
so' is not supported by Azure Pipelines.
See additional documentation. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
When Sixel images are rendered, they're automatically scaled to match the 10x20 cell size of the original hardware terminals. If this requires the image to be scaled down, the default GDI stretching mode can produce ugly visual artefacts, particularly for color images. This PR changes the stretching mode to `COLORONCOLOR`, which looks considerably better, but without impacting performance. The initial Sixel implementation was added in PR #17421. ## Validation Steps Performed I've tested with a number of different images using a small font size to trigger the downscaling, and I think the results are generally better, although simple black on white images are still better with the default mode (i.e. `BLACKONWHITE`), which is understandable. I've also checked the performance with a variation of the [sixel-bench] test, and confirmed that the new mode is no worse than the default. [sixel-bench]: https://github.com/jerch/sixel-bench (cherry picked from commit b243fb6) Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgZ0dHI Service-Version: 1.22
When Sixel images are rendered, they're automatically scaled to match the 10x20 cell size of the original hardware terminals. If this requires the image to be scaled down, the default GDI stretching mode can produce ugly visual artefacts, particularly for color images. This PR changes the stretching mode to `COLORONCOLOR`, which looks considerably better, but without impacting performance. The initial Sixel implementation was added in PR #17421. ## Validation Steps Performed I've tested with a number of different images using a small font size to trigger the downscaling, and I think the results are generally better, although simple black on white images are still better with the default mode (i.e. `BLACKONWHITE`), which is understandable. I've also checked the performance with a variation of the [sixel-bench] test, and confirmed that the new mode is no worse than the default. [sixel-bench]: https://github.com/jerch/sixel-bench (cherry picked from commit b243fb6) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgZ0dHA Service-Version: 1.23

Summary of the Pull Request
When Sixel images are rendered, they're automatically scaled to match
the 10x20 cell size of the original hardware terminals. If this requires
the image to be scaled down, the default GDI stretching mode can produce
ugly visual artefacts, particularly for color images. This PR changes
the stretching mode to
COLORONCOLOR, which looks considerably better,but without impacting performance.
References and Relevant Issues
The initial Sixel implementation was added in PR #17421.
Validation Steps Performed
I've tested with a number of different images using a small font size to
trigger the downscaling, and I think the results are generally better,
although simple black on white images are still better with the default
mode (i.e.
BLACKONWHITE), which is understandable.I've also checked the performance with a variation of the sixel-bench
test, and confirmed that the new mode is no worse than the default.