Skip to content

Instantly share code, notes, and snippets.

@Couto

Couto/README.md Secret

Last active August 29, 2015 14:01
Show Gist options
  • Save Couto/f57dcd3a39c33a056bfb to your computer and use it in GitHub Desktop.
Save Couto/f57dcd3a39c33a056bfb to your computer and use it in GitHub Desktop.
Dev enviroment for node-imagemagick-native, where an error happens everytime I try to convert a .tif image.

Please download the related image by clicking this link I tried to push the image as a gist file, but github doesn't allow files that big.

{
"name": "imagemagick-native-debug",
"version": "0.0.0",
"description": "",
"main": "resize.js",
"dependencies": {
"imagemagick-native": "^1.0.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://gist.github.com/f57dcd3a39c33a056bfb.git"
},
"author": "",
"license": "ISC"
}
var fs = require('fs'),
imagemagick = require('imagemagick-native'),
imgIn = 'snoop-dogg-uncompressed.tif',
imgOut = 'snoop-dogg-uncompressed-imagemagick-native.jpg',
srcData = fs.readFileSync(imgIn);
fs.writeFileSync(imgOut, imagemagick.convert({
srcData: srcData
}), 'binary');
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
apt-get update --fix-missing
apt-get install -y python-software-properties build-essential
add-apt-repository -y ppa:chris-lea/node.js
apt-get update
apt-get install -y nodejs libmagick++-dev
SCRIPT
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty32"
config.vm.provision "shell", inline: $script
end
This file has been truncated, but you can view the full file.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment