stumpy_jpeg
Version, currently master branch1 version
- master branchlatestOct 24, 2019
github.com/stumpycr/stumpy_jpeg
Read JPEG images in pure Crystal
10 stars
6 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
stumpy_jpeg:
github: stumpycr/stumpy_jpeg
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.27.0- License
- MIT
- Author
- reiswindy
Dependencies
Runtime Dependencies
- matrix*github: Exilor/matrix
- stumpy_core*github: stumpycr/stumpy_core
README
stumpy_jpeg
WORK IN PROGRESS
Read sequential and progressive JPEGs.
- Does not support arithmetic encoding.
Installation
- Add the dependency to your
shard.yml:
dependencies:
stumpy_jpeg:
github: reiswindy/stumpy_jpeg
- Run
shards install
Interface
StumpyJPEG.read(file : String) : Canvasreads a JPEG image from a fileStumpyJPEG.read(io : IO) : Canvasreads a JPEG image from an IOStumpyJPEG::JPEGholds image associated data during parsing
Usage
require "stumpy_jpeg"
canvas = StumpyJPEG.read("yamboli.jpg")
For progressive reading
require "stumpy_jpeg"
StumpyJPEG.read("yamboli.jpg") do |canvas|
r, g, b = canvas[0, 0].to_rgb8
puts "red=#{r}, green=#{g}, blue=#{b}"
end
To Do / Wishlist
- [ ] JFIF header parsing support
- [x] Downsampled image support
- [ ] Arithmetic encoding support
- [ ] Add more tests
Contributing
- Fork it (https://github.com/reiswindy/stumpy_jpeg/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
- reiswindy - creator and 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
- Oct 24, 2019
- Crystal
0.27.0- Indexed
- yes
Dependents
Repository
github.com/stumpycr/stumpy_jpeg
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 29, 2026
- Synced
- Sep 29, 2026
- Versions
- 1