hectorm / chafa-wasm Goto Github PK
View Code? Open in Web Editor NEWChafa WebAssembly module to convert images to text.
Home Page: https://hectorm.github.io/chafa-wasm/
License: GNU Lesser General Public License v3.0
Chafa WebAssembly module to convert images to text.
Home Page: https://hectorm.github.io/chafa-wasm/
License: GNU Lesser General Public License v3.0
Hi, thanks for this.
Would it be possible for you to implement support to configure Sixel pixel mode/output (ANSI module). This is supported in many terminal emulators (xterm, konsole, kitty etc.) and gives a close-to-bitmap look (true color/pixel level.)
It would be for this config: ChafaPixelMode
https://github.com/hectorm/chafa-wasm/blob/master/src/chafa.js#L324
https://github.com/hectorm/chafa-wasm/blob/master/src/chafa-bindings.hpp#L35
In any case, thanks.
Absolutely enjoying being able to play with chafa in a web browser after several thoughts about doing something to do so myself over last year or two but never getting beyond the fruitful thinking stage so firstly many thanks for doing so!
Just curious if support for manually setting symbols in the Symbols and Fill options is supported or could be easily supported if not so?
Such as:
FILL
ascii-‘@'-‘#’
OR
SYMBOL
[" ", ".", "·", "•", "-", "|", "/", "\\", "┌", "┐", "└", "┘", "┴", "┬", "┤", "├", "█", "▀", "▄", "▐", "▌", "▘", "▝", "▖", "▗", "┼", "⌓", "⌒", "⌐", "⌌", "<", ">", "^", "v", "▲", "▼", "◄", "►"]
Trying to remove certain characters from the ASCII symbol set that get picked to often for what ascii character used in placements when set to lowest colour options and ascii character set as seen for example below using the initial demo image. I can edge detect and edge thin and process the images before conversion of course to limit this issue but being able to `ascii-"@" would be handy when playing with the options on the web version before jumping into a local install of chafa later)
Colors: FGBG
Symbols: Ascii
Fill: None
___yaggy_
yg@@@@@@@@@@@@@g_
_yg@@@@@@@R@B$$@$@@@@@$
_a@@@@@@@M4@@P?~~@A@$RA@@-
yg@@@@@@$M@^ ~~, f@@@@@@$y_yL_
y@@@@@@@~> ! ` . f3~%@@@@@@@"`_
_g@@@@@@@@y Q@@$@$@$0@@=-
w_,. yg@@@@@@@@@@@@g@ar` ``R@=@@$@@
_yg@@@@@@@@0@@@@R$@@E_y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aa@@@@@@@@$aaa$@@@@@@@@@@@@@@@
I could be confused and making up that the official chafa supports this as a option if so disregard this as its outside of the scope of this excellent chafa wasm variant!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.