1.2.0 • Published 10 years ago

imagemagick-prebuilt v1.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

ImageMagick Prebuilt

Install Node Package

npm install --save imagemagick-prebuilt

Install ImageMagick within NodeJS

var imagemagick_prebuilt = require( 'imagemagick-prebuilt' );

var child_process = require( 'child_process' );

exports.handler = function( event, context ) {
    imagemagick_prebuilt()
        .then( function( imagemagick_bin_location ) {
            // ImageMagick logo creation test:
            // convert logo: logo.gif
            var convert_process = child_process
                .spawn( imagemagick_bin_location, [ 'logo:', 'logo.gif' ] )

            convert_process
                .on( 'close', function() {
                    context.success();
                } );
        } );
};

Or with q.async

var imagemagick_prebuilt = require( 'imagemagick-prebuilt' );

var child_process = require( 'child_process' );

exports.handler = function( event, context ) {
    return q
        .async( function *() {
            imagemagick_bin_location = yield imagemagick_prebuilt();
            console.log( `ImageMagick installed: ${imagemagick_bin_location}` );

            // ImageMagick logo creation test:
            // convert logo: logo.gif
            var convert_process = child_process
                .spawn( imagemagick_bin_location, [ 'logo:', 'logo.gif' ] )

            convert_process
                .on( 'close', function() {
                    context.success();
                } );
        } )();
};

Will be installed to /tmp/imagemagick

Build/Upload new version

./build.sh

Build is output to artifacts/imagemagick-prebuilt.tar.gz

./upload.sh ${verison_number}
1.2.0

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago