magickwand-crystal

Bindings for MagickWand, the C interface for ImageMagick processing libraries imagemagick magickwand
0.1.4 released

magickwand for Crystal

Build Status


Crystal C bindings for MagickWand library, an interface to use the ImageMagick image processing libraries - see www.imagemagick.org

NOTE: actually only a part of the MagickCore and MagickWand are mapped, it's a quite large library

Requirements

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

Installation

  • Add this to your application's shard.yml:
dependencies:
  magickwand-crystal:
    github: blocknotes/magickwand-crystal

Usage

Get image info:

require "magickwand-crystal"
LibMagick.magickWandGenesis    # lib init
wand = LibMagick.newMagickWand # lib init
if LibMagick.magickReadImage( wand, "test.png" )
  puts LibMagick.magickGetImageWidth wand
  puts LibMagick.magickGetImageHeight wand
end
LibMagick.destroyMagickWand wand  # lib deinit
LibMagick.magickWandTerminus      # lib deinit

Scale and convert image:

require "magickwand-crystal"
# ... lib init ...
LibMagick.magickReadImage wand, "test.png"
LibMagick.magickScaleImage wand, 320, 240
LibMagick.magickWriteImage wand, "test2.jpg"
# ... lib deinit ...

More examples

See examples folder.

Notes

This is the Crystal Magic Wand ! :)

Sounds funny but I hope you find it a useful piece of software.

Contributors

magickwand-crystal:
  github: blocknotes/magickwand-crystal
  version: ~> 0.1.4
License MIT
Crystal 0.20.3

Authors

Dependencies 0

Development Dependencies 0

Dependents 0

Last synced .
search fire star recently