-
Notifications
You must be signed in to change notification settings - Fork 241
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
feat: mosaic (halfblocks graphics) support #482
base: v2-exp
Are you sure you want to change the base?
Conversation
cd60771
to
c5c65b6
Compare
Bumps [github.com/muesli/termenv](https://github.com/muesli/termenv) from 0.15.2 to 0.16.0. - [Release notes](https://github.com/muesli/termenv/releases) - [Commits](muesli/termenv@v0.15.2...v0.16.0) --- updated-dependencies: - dependency-name: github.com/muesli/termenv dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
92097b0
to
811f6dc
Compare
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.
The goal here is to make both mosaic.New()
and mosaic.Mosaic{}
return the same thing
Regarding mosaic, I think would be good to support MaxWidth and MaxHeight, so people can create constraints for one or both and allow mosaic do the image perspective calculation cc @aymanbagabas @meowgorithm . The new width/height API forces the dev to write the exact (or approximate) width/height and it can be quite tedious/unhandy job. |
Original PR: charmbracelet/x#387
Convert images to strings using half blocks symbols
TODO
mosaic.New().Width(100).Height(40).Render(img)
draw.Scaler
draw.FloydSteinberg
Added examples
Simple Example
Scaling
Scales uses bilinear, which works at least as well as the others do in every situation. So prob use Bilinear for upscaling and downscaling as default.
scaling 1x and 2x:
Other examples