How to use the imagemagick.resize function in imagemagick

To help you get started, we’ve selected a few imagemagick examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TooTallNate / nTunes / handlers.js View on Github external
format = "jpg";
        } else if (/PNG/i.test(format)) {
          format = "png";
        } else {
          throw new Error("Unrecognized iTunes Artwork format: \"" + format +'"')
        }
        
        var args = req.parsedUrl.query;
        if (args) {
          if (args.size) args.width = args.height = args.size;
          this.parallel()(null, args.format || format);
          args.srcData = rawData.toString('binary');
          args.srcFormat = format;
          args.format = args.format || format;
          delete args.dstPath;
          im.resize(args, this.parallel());
        } else {
          // No query params given, just send the original image data.
          this.parallel()(null, format);
          this.parallel()(null, rawData);
        }
      },
      function(err, format, rawData) {
github blueimp / jQuery-File-Upload / server / node / server.js View on Github external
Object.keys(options.imageVersions).forEach(function (version) {
                    counter += 1;
                    var opts = options.imageVersions[version];
                    imageMagick.resize({
                        width: opts.width,
                        height: opts.height,
                        srcPath: options.uploadDir + '/' + fileInfo.name,
                        dstPath: options.uploadDir + '/' + version + '/' +
                            fileInfo.name
                    }, finish);
                });
            }
github tus / tus-jquery-client / jquery-file-upload / server / node / server.js View on Github external
Object.keys(options.imageVersions).forEach(function (version) {
                    counter += 1;
                    var opts = options.imageVersions[version];
                    imageMagick.resize({
                        width: opts.width,
                        height: opts.height,
                        srcPath: options.uploadDir + '/' + fileInfo.name,
                        dstPath: options.uploadDir + '/' + version + '/' +
                            fileInfo.name
                    }, finish);
                });
            }
github SlashmanX / xForum / server / modules / upload-manager.js View on Github external
Object.keys(options.imageVersions).forEach(function (version) {
                        if (!_existsSync(options.uploadDir + '/' + version + '/'))
                            throw new Error(options.uploadDir + '/' + version + '/' + ' not exists');
                        counter++;
                        var opts = options.imageVersions[version];
                        imageMagick.resize({
                            width: opts.width,
                            height: opts.height,
                            srcPath: options.uploadDir + '/' + fileInfo.name,
                            dstPath: options.uploadDir + '/' + version + '/' + fileInfo.name
                        }, finish);
                    });
                }
github amd / rest3d / server / rest3d-exists-server.js View on Github external
Object.keys(options.imageVersions).forEach(function (version) {
                counter += 1;
                var opts = options.imageVersions[version];
                imageMagick.resize({
                    width: opts.width,
                    height: opts.height,
                    srcPath: options.uploadDir + '/' + fileInfo.name,
                    dstPath: options.uploadDir + '/' + version + '/' +
                        fileInfo.name
                }, finish);
            });
        }
github safesoftware / fmepedia-easytranslator / www / libs / upload / server / node / server.js View on Github external
Object.keys(options.imageVersions).forEach(function (version) {
                    counter += 1;
                    var opts = options.imageVersions[version];
                    imageMagick.resize({
                        width: opts.width,
                        height: opts.height,
                        srcPath: options.uploadDir + '/' + fileInfo.name,
                        dstPath: options.uploadDir + '/' + version + '/' +
                            fileInfo.name
                    }, finish);
                });
            }
github mmacmillan / cordova-imaging / imaging.js View on Github external
function doResize() {
            magick.resize(opt, function(err) {
                //** imagemagick wont create directories (yet), so a failure in creating images usually means directories are missing...
                !!err ? def.reject(err) : def.resolve();
            });
        }
github jelz / awsletter / lambdas / resize-image.js View on Github external
function resize(data, cb) {
    require('imagemagick').resize({
        srcData: data,
        width: RESIZED_WIDTH
    }, function(err, out) {
        if (err) { return cb(err); }
        cb(null, new Buffer(out, 'binary'));
    });
}
github bipio-server / bipio / src / lib / cdn.js View on Github external
resize : function(args, next) {
    imagemagick.resize(args, next);
  },

imagemagick

A wrapper around the imagemagick cli

Unknown
Latest version published 11 years ago

Package Health Score

44 / 100
Full package analysis

Popular imagemagick functions