pixie

User friendly API built on top of ImageMagick 7 bindings
HEAD Yanked release released
watzon/pixie
18 1
Chris Watson
pixie logo

Pixie

Crystal bindings to ImageMagick 7. The goal is to have a full Crystal interface to the MagickWand API.

NOTE: This is a large undertaking as ImageMagick is a massive library. Contributions are always welcome!

Requirements

  • libMagickWand must be installed
  • pkg-config must be available

Installation

  • Add this to your application's shard.yml:
dependencies:
  pixie:
    github: watzon/pixie

Usage

Get image info:

require "pixie"

set = Pixie::ImageSet.new("test.png")

puts set.image_width
puts set.image_height

Scale image and save in JPEG format:

require "pixie"

set = Pixie::ImageSet.new("test.png")
set.scale_image(320, 240)
set.write("test2.jpg")

Convert to grayscale:

require "pixie"

set = Pixie::ImageSet.new("test.png")
set.transform_image_colorspace(:gray)
set.write("grayscale.jpg")

More examples

See examples folder. There is also an example to generate an image on the fly with Kemal.

Note: This project was forked from blocknotes/magickwand-crystal and all of the examples are still using the barebones ImageMagick api. New examples will be coming.

Contributors

pixie:
  github: watzon/pixie
  
License MIT
Crystal 0.33.0

Authors

Dependencies 0

Development Dependencies 0

Dependents 0

Last synced .
search fire star recently