Giter VIP home page Giter VIP logo

emagick's Introduction

Wrapper in Erlang for Image/GraphicsMagick

Simple wrapper for GraphicsMagick or ImageMagick using an Erlang port.

Dependencies

Either GraphicsMagick or ImageMagick commandline tools are of course required. On a Debian based system install either graphicsmagick or imagemagick and then configure magick_prefix in your app.config accordingly.

Furthermore rebar and git are necessary to use the automatic build system.

The Erlang package uuid is another dependency

https://github.com/okeuday/uuid

Installation

Build and install with the supplied Makefile or use rebar. Simply typing make will build emagick.

Configuration

It is possible to choose which *magick command to run and what path to use as working directory (default /tmp/emagick if omitted) by configuring magick_prefix and working_directory when you run emagick by passing a proplist with the below settings to convert/5.

    {magick_prefix, ""},       %% ImageMagick
    %{magick_prefix, "gm"},    %% GraphicsMagick
    {working_directory, "/tmp/emagick"}

Example usage

1> {ok, Pdf} = file:read_file("something.pdf").
2> {ok, Png} = emagick:convert(Pdf, pdf, png, [{density, 200}]).
3> ok = file:write_file("something.png", Png).

License

emagick is released under an MIT license. See LICENSE for the full license text.

vim:ft=markdown:tw=72

emagick's People

Contributors

b3rnie avatar bipthelin avatar cheng81 avatar jlouis avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.