This reverts commit 38f5f552eb, reversing

changes made to 5a14305eeb.
master
Rowan Wookey 9 years ago
parent 27358c2ee9
commit f04ba5eb2b
  1. 1
      .gitignore
  2. BIN
      examples/imgs/icon.ico
  3. 1
      index.js
  4. 21
      test/formatInference.js
  5. 3
      test/gifFrameStream.js
  6. 2
      test/resizeAndAutoOrientFromBuffer.js
  7. 2
      test/resizeBuffer.js
  8. 3
      test/streamerr.js

1
.gitignore vendored

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

@ -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;

@ -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();
});
}

@ -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();

@ -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]);

@ -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]);

@ -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) {

Loading…
Cancel
Save