took out the meta config check from image.js

This commit is contained in:
barisusakli
2014-08-08 17:30:37 -04:00
parent ea2975cb3f
commit 4e4a583d9d
2 changed files with 8 additions and 6 deletions

View File

@@ -1,8 +1,7 @@
'use strict';
var fs = require('fs'),
gm = require('gm').subClass({imageMagick: true}),
meta = require('./meta');
gm = require('gm').subClass({imageMagick: true});
var image = {};
@@ -28,8 +27,7 @@ image.resizeImage = function(path, extension, width, height, callback) {
};
image.convertImageToPng = function(path, extension, callback) {
var convertToPNG = parseInt(meta.config['profile:convertProfileImageToPNG'], 10);
if(convertToPNG && extension !== '.png') {
if(extension !== '.png') {
gm(path).toBuffer('png', function(err, buffer) {
if (err) {
return callback(err);