GithubHelp home page GithubHelp logo

merlin's Introduction

Merlin - ImageMagick bindings for node.js

Usage

var merlin = require('merlin');
// create a new MerlinImage with a node Buffer containing data from an image
var image = new merlin.MerlinImage(buffer);
var new_image = image.resize(300, 400);
// operations can be chained
var new_image = new_image.negative().crop(100, 100, 0, 0);
// when finished, get the buffer from the image
res.write(new_image.getBuffer());

Supported Operations

MerlinImage.blur(/*double*/ radius, /*double*/ sigma)
MerlinImage.charcoal(/*double*/ radius, /*double*/ sigma)
MerlinImage.chop(/*int*/ width, /*int*/ height, /*int*/ xoffset, /*int*/ yoffset)
MerlinImage.clip()
MerlinImage.clipPath(/*String*/ pathname, /*int*/ inside)
MerlinImage.crop(/*int*/ width, /*int*/ height, /*int*/ xoffset, /*int*/ yoffset)
MerlinImage.mosaic(/*MerlinImage*/ image0[,/*MerlinImage*/ image1.../*MerlinImage*/ imageN])
MerlinImage.negative()
MerlinImage.resize(/*int*/ width, /*int*/ height)
MerlinImage.rotate(/*double*/ degrees)

More to come!

merlin's People

Contributors

ncb000gt avatar polotek avatar thegreatape avatar

Stargazers

Mickael van der Beek avatar Dhi Aurrahman avatar JT5D avatar Austin Riendeau avatar Ryan French avatar Lucas Alberto avatar Viktor Evdokimov avatar  avatar Robin van der Vleuten avatar Mike Curtis avatar Ivar Vong avatar Dubois Hugues avatar Masroor Naved avatar Scott Elcomb avatar  avatar  avatar Alexey Zapparov avatar Andy Ray avatar Oleg Efimov avatar Tomohisa Oda avatar  avatar  avatar Oleg Isonen avatar Eric Abouaf avatar Jeff Pelton avatar Sam Murphy avatar jens alexander avatar Jason Nelson avatar Anton Sokol avatar

Watchers

 avatar  avatar James Cloos avatar  avatar

Forkers

polotek

merlin's Issues

ability to sharpen images

In my experience sharpening an image after sizing it down, even a sharpen of 10%, greatly improves the clarity and appearance of an image. +1 for sharpening

ability to handle images not invovling the database

For neat people who just want to use this as a manipulation library and not be tied to a db, having the ability to just manipulate images would be handy. Like pass in a stream / file object and get back a stream / file object. Alternately, just being able to point to a filesystem image and write back to filesystem images would have the same effect I'm looking for.

(semaphore_info != (SemaphoreInfo *) NULL)

With this simple script:

var merlin = require("merlin");
var fs = require("fs");

fs.readFile("test/fixtures/matador.jpg", function(err, data) {
  var img = new merlin.MerlinImage(data);
  var newImg = img.resize(200, 200);
})

I get this error:

Assertion failed: (semaphore_info != (SemaphoreInfo *) NULL), function LockSemaphoreInfo, file magick/semaphore.c, line 525.
[1]    86612 abort      node merlin.js

Node: 0.2.1
GraphicsMagick: 1.3.12
Merlin: 686de4b
Mac OS X 10.6

You can hit me up on IRC as well, harryv in the node channel.

Look for GraphicsMagick-config

I have installed GraphicsMagick on Mac OS X via Homebrew. I had to change wscript to look for GraphicsMagick-config and GraphicsMagickWand-config instead of Magick-config and MagickWand-config.

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.