https://github.com/exts/gisc
Generic Image Signature Checker written in Crystal
https://github.com/exts/gisc
Last synced: 12 months ago
JSON representation
Generic Image Signature Checker written in Crystal
- Host: GitHub
- URL: https://github.com/exts/gisc
- Owner: exts
- License: mit
- Created: 2017-11-06T14:05:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-06T14:19:01.000Z (over 8 years ago)
- Last Synced: 2025-04-11T12:18:55.353Z (about 1 year ago)
- Language: Crystal
- Size: 5.86 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gisc
Gisc, short for Generic Image Signature Checker, is a generic image signature checker to validate if an image is of the type that is being loaded. Allows for making sure an image is a valid gif, jpeg or png.
Currently theonly supported image types are:
- jpg
- png
- gif
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
Gisc:
github: exts/Gisc
```
## Usage
```crystal
require "Gisc"
imginfo = Gisc::Checker.new "path/to/image.png"
if imginfo.check "png"
puts "this is a valid png"
puts imginfo.signature
#puts imginfo.image.get() #read Gisc/Image.cr for more info
end
```
## Contributing
1. Fork it ( https://github.com/exts/Gisc/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contributors
- [exts](https://github.com/exts) exts - creator, maintainer