Skip to content
/ emagick Public
forked from kivra/emagick

Wrapper for Graphics/ImageMagick command line tool.

License

Notifications You must be signed in to change notification settings

RajuC/emagick

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Wrapper for Graphics/ImageMagick command line tool.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Erlang 99.1%
  • Makefile 0.9%