All Projects → blocknotes → magickwand-crystal

blocknotes / magickwand-crystal

Licence: MIT License
Crystal C bindings for MagickWand library

Programming Languages

crystal
512 projects

Projects that are alternatives of or similar to magickwand-crystal

MagickWand
Swift wrapper for ImageMagick (MagickWand) for Linux and MacOS
Stars: ✭ 38 (-43.28%)
Mutual labels:  imagemagick, magickwand
magick-rust
Rust bindings for ImageMagick
Stars: ✭ 135 (+101.49%)
Mutual labels:  imagemagick, magickwand
blurlock-neofetch
A standard i3lock blur screen, but now with neofetch stats overlayed
Stars: ✭ 17 (-74.63%)
Mutual labels:  imagemagick
mozscreenshots
Take screenshots of Mozilla applications in various UI configurations
Stars: ✭ 17 (-74.63%)
Mutual labels:  imagemagick
giftext
Convert texts to animated gifs
Stars: ✭ 44 (-34.33%)
Mutual labels:  imagemagick
MagickSlicer
Map tiles generator
Stars: ✭ 73 (+8.96%)
Mutual labels:  imagemagick
cyan
Cyan Color Converter
Stars: ✭ 68 (+1.49%)
Mutual labels:  imagemagick
RobotEyes
Image comparison for Robot Framework
Stars: ✭ 62 (-7.46%)
Mutual labels:  imagemagick
pdfScale
Bash Script to Scale and Resize PDFs using Ghostscript
Stars: ✭ 131 (+95.52%)
Mutual labels:  imagemagick
metalsmith-convert
Convert images with imagemagick (via imagemagick-native).
Stars: ✭ 17 (-74.63%)
Mutual labels:  imagemagick
srcset.sh
A command line script that generates multiple responsive versions of an image at width breakpoints -- 320,480,640,768,960,1024,1280,1440 pixels wide -- that match common Mobile and widescreen desktop/laptop viewports using Imagemagick's convert utility and outputs the needed <img/> tag
Stars: ✭ 20 (-70.15%)
Mutual labels:  imagemagick
codeigniter-image-magician
🎨 An ImageMagick library for CodeIgniter.
Stars: ✭ 13 (-80.6%)
Mutual labels:  imagemagick
FuzzImageMagick
Sample files for fuzzing ImageMagick
Stars: ✭ 15 (-77.61%)
Mutual labels:  imagemagick
Dev-Tools-Magento-2-Module
A collection of utilities meant to improve the experience of developing modules for Magento without breaking existing functionality.
Stars: ✭ 18 (-73.13%)
Mutual labels:  imagemagick
favicon
💥 Favicon Generator using Node.js and Imagemagick
Stars: ✭ 33 (-50.75%)
Mutual labels:  imagemagick
slitcamera
Bash script to turn video file into slit photo
Stars: ✭ 41 (-38.81%)
Mutual labels:  imagemagick
converjon
An advanced image conversion server and command line tool.
Stars: ✭ 52 (-22.39%)
Mutual labels:  imagemagick
imei
IMEI - ImageMagick Easy Install
Stars: ✭ 126 (+88.06%)
Mutual labels:  imagemagick
image-optimisation-tools-comparison
A Benchmarking Suite for popular Image Optimisation Tools
Stars: ✭ 28 (-58.21%)
Mutual labels:  imagemagick
lambda-resize-image
An AWS Lambda Function to resize images automatically with API Gateway and S3 for imagemagick tasks. When an image is called on AWS Api Gateway, this package will resize it and send it to the S3.
Stars: ✭ 56 (-16.42%)
Mutual labels:  imagemagick

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: Base on ImageMagick-7.0.8-66. MagickWand is a quite large library, if you find something missing contact me

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 image and save in Jpeg format:

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

Convert to grayscale:

require "magickwand-crystal"
# ... lib init ...
LibMagick.magickReadImage wand, "test.jpg"
LibMagick.magickTransformImageColorspace wand, LibMagick::ColorspaceType::GRAYColorspace
LibMagick.magickWriteImage wand, "grayscale.jpg"
# ... lib deinit ...

More examples

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

Documentation

The functions mapped have the same names of the MagickWand C library but with the first letter in lowercase.

Example: MagickWandGenesis => LibMagick.magickWandGenesis

Notes

Branches with different ImageMagick version:

  • im_6.9.7-3
  • im_7.0.4-1

The Crystal Magic Wand ! :)

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

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].