show deprecation warning for .write()

This commit is contained in:
Jonathan Ong
2014-06-03 20:53:15 -07:00
parent 5ccc2bca97
commit 5e0b5969da
3 changed files with 6 additions and 4 deletions

View File

@@ -219,7 +219,7 @@ async.series([
},
// Do not enlarge the output if the input width is already less than the output width
function(done) {
sharp(inputJpg).resize(2800).withoutEnlargement().write(outputJpg, function(err) {
sharp(inputJpg).resize(2800).withoutEnlargement().toFile(outputJpg, function(err) {
if (err) throw err;
imagemagick.identify(outputJpg, function(err, features) {
if (err) throw err;
@@ -231,7 +231,7 @@ async.series([
},
// Do not enlarge the output if the input height is already less than the output height
function(done) {
sharp(inputJpg).resize(null, 2300).withoutEnlargement().write(outputJpg, function(err) {
sharp(inputJpg).resize(null, 2300).withoutEnlargement().toFile(outputJpg, function(err) {
if (err) throw err;
imagemagick.identify(outputJpg, function(err, features) {
if (err) throw err;