diff --git a/.gitignore b/.gitignore index 37f3f96..0d04d00 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,5 @@ examples/imgs/* !examples/imgs/photo.JPG !examples/imgs/orientation/*\d.jpg !examples/imgs/orientation/*.correct.jpg -!examples/imgs/icon.ico *.sw* .idea \ No newline at end of file diff --git a/examples/imgs/icon.ico b/examples/imgs/icon.ico deleted file mode 100644 index 200367a..0000000 Binary files a/examples/imgs/icon.ico and /dev/null differ diff --git a/index.js b/index.js index fb86a5e..6e622d8 100644 --- a/index.js +++ b/index.js @@ -74,7 +74,6 @@ function gm (source, height, color) { var inputFromStdin = this.sourceStream || this.sourceBuffer; var ret = inputFromStdin ? '-' : this.source; - if (inputFromStdin && this.source && this.source !== 'unknown.jpg') ret = this.source.split('.').pop() + ':-'; if (ret && this.sourceFrames) ret += this.sourceFrames; src.length = 0; diff --git a/test/formatInference.js b/test/formatInference.js deleted file mode 100644 index 111c5df..0000000 --- a/test/formatInference.js +++ /dev/null @@ -1,21 +0,0 @@ -var assert = require('assert') -var fs = require('fs'); - -module.exports = function (_, dir, finish, gm) { - var m = gm(fs.createReadStream(dir + '/icon.ico'), 'icon.ico') - - var args = m.args(); - assert.equal('convert', args[0]); - assert.equal('ico:-', args[1]); - - if (!gm.integration) - return finish(); - - m - .size({bufferStream: true}, function (err, size) { - if (err) return finish(err); - assert.equal(128, size.width); - assert.equal(128, size.height); - finish(); - }); -} diff --git a/test/gifFrameStream.js b/test/gifFrameStream.js index 1d7e447..5e1d912 100644 --- a/test/gifFrameStream.js +++ b/test/gifFrameStream.js @@ -1,3 +1,4 @@ + var assert = require('assert') var fs = require('fs'); @@ -6,7 +7,7 @@ module.exports = function (_, dir, finish, gm) { var args = m.args(); assert.equal('convert', args[0]); - assert.equal('gif:-[0]', args[1]); + assert.equal('-[0]', args[1]); if (!gm.integration) return finish(); diff --git a/test/resizeAndAutoOrientFromBuffer.js b/test/resizeAndAutoOrientFromBuffer.js index 9ece772..522bdf9 100755 --- a/test/resizeAndAutoOrientFromBuffer.js +++ b/test/resizeAndAutoOrientFromBuffer.js @@ -14,7 +14,7 @@ module.exports = function (_, dir, finish, gm) { var args = m.args(); assert.equal('convert', args[0]); - assert.equal('jpg:-', args[1]); + assert.equal('-', args[1]); assert.equal('-resize', args[2]); if (m._options.imageMagick) { assert.equal('20%', args[3]); diff --git a/test/resizeBuffer.js b/test/resizeBuffer.js index 0e5c089..208e91a 100755 --- a/test/resizeBuffer.js +++ b/test/resizeBuffer.js @@ -13,7 +13,7 @@ module.exports = function (_, dir, finish, gm) { var args = m.args(); assert.equal('convert', args[0]); - assert.equal('jpg:-', args[1]); + assert.equal('-', args[1]); assert.equal('-resize', args[2]); if (m._options.imageMagick) { assert.equal('48%', args[3]); diff --git a/test/streamerr.js b/test/streamerr.js index 099006e..d9f6c23 100644 --- a/test/streamerr.js +++ b/test/streamerr.js @@ -7,7 +7,8 @@ module.exports = function (_, dir, finish, gm) { // The following invocation should fail, because 'convert' // has no way of interpreting the file. gm( - svg_file + svg_file, + './test.svg' // fiction ).options({ imageMagick: true }).setFormat('png').toBuffer(function(err, buffer) {