visto
Version, currently master branch1 version
- master branchlatestFeb 23, 2018
github.com/petoem/visto
Store bytes as an image
Installation
# Add this to your shard.yml
dependencies:
visto:
github: petoem/visto
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.24.1- License
- MIT
- Author
- Michael Petö
- Target
vistofrom src/cli.cr
Dependencies
Runtime Dependencies
- stumpy_png~> 4.2github: l3kn/stumpy_png
README
visto
visto (Visual Storage) allows you to store Bytes as an image.
Build
> crystal build src/cli.cr --release -o visto
Usage
Command Line
> visto --help
Usage: visto [FILE] [arguments]
-e, --encode Encode data into image
-d, --decode Decode data from image
-o FILE, --output=FILE Specifies the output file path
-v, --version Show version number
-h, --help Show this help
>
> # to store a file as an image, run ...
> visto myawesome.pdf -e -o image.png
> # to get your file ...
> visto image.png -d -o my.pdf
Library
Add this to your application's shard.yml:
dependencies:
visto:
github: petoem/visto
Visto.encode(data : Bytes) : Canvas
Returns a StumpyCore::Canvas that contains data.
Visto.decode(canvas : Canvas) : Bytes
Returns the extracted bytes from the canvas.
Example
The file random.txt as an image.
Each pixel corresponds to a byte. Bytes are written from left to right, top to bottom.
The first 8 pixels represents a UInt64 number, which tells how many bytes long the stored data is.
After this data pixels follow. Any excess pixels at the end are filled up with black.
Contributing
- Fork it ( https://github.com/petoem/visto/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- petoem Michael Petö - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Feb 23, 2018
- Crystal
0.24.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/petoem/visto
Metadata
- Created
- Aug 12, 2026
- Updated
- Oct 20, 2026
- Synced
- Oct 20, 2026
- Versions
- 1