imgkit
ImgKit
Image Toolkit for Crystal based on MagicWand binding from ImageMagick
Installation
-
Add the dependency to your
shard.yml
:dependencies: imgkit: github: xtokio/imgkit
-
Run
shards install
Usage
require "imgkit"
# Info
img = ImgKit::Image.new("demo.png")
info = img.info
puts "Path: #{info[:path]} Width: #{info[:width]}px Height: #{info[:height]}px"
img.finish
# Resize
img = ImgKit::Image.new("demo.png")
img.resize(width: 301)
img.save("output/resize.png")
img.finish
# Blur
img = ImgKit::Image.new("demo.png")
img.blur(5.0)
img.save("output/blur.png")
img.finish
# Crop
img = ImgKit::Image.new("demo.png")
img.crop(width: 120, height: 200, x: 50, y: 50)
img.save("output/crop.png")
img.finish
# Combin
img = ImgKit::Image.new("demo.png")
img.resize(width: 410)
img.blur(5.0)
img.crop(width: 200)
img.save("output/combin.png")
img.finish
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/xtokio/imgkit/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
- Hentioe - creator
- Luis Gomez - maintainer
Repository
imgkit
Owner
Statistic
- 8
- 0
- 0
- 1
- 0
- almost 5 years ago
- February 5, 2020
License
MIT License
Links
Synced at
Mon, 25 Nov 2024 02:43:40 GMT
Languages