fastimage.cr
Library that finds the dimensions and type of an image fetching as little as needed.
Installation
-
Add the dependency to your
shard.yml
:dependencies: fastimage: github:jetrockets/fastimage.cr
-
Run
shards install
Usage
require "fastimage"
FastImage.type("https://file-examples.com/wp-content/uploads/2017/10/file_example_PNG_3MB.png") #png
FastImage.dimensions("https://file-examples.com/wp-content/uploads/2017/10/file_example_PNG_3MB.png") #[2200, 1467]
Feature Progress
- [ ] Data sources
- [X] Remote file
- [X] HTTP/HTTPS
- [ ] Proxy
- [ ] HTTP redirects
- [X] Local file
- [ ] IO
- [ ] Base64
- [X] Remote file
- [ ] File formats
- [X] BMP
- [X] CUR
- [X] GIF
- [X] ICO
- [X] JPEG
- [ ] parse EXIF information for JPEG orientation
- [X] PNG
- [ ] PSD
- [ ] SVG
- [ ] TIFF
- [X] WEBP
Contributing
- Fork it (https://github.com/jetrockets/fastimage.cr/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
- Igor Alexandrov - creator and maintainer