A somewhat updated fork from GraphicsMagick for node
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

31 lines
689 B

var assert = require('assert')
module.exports = function (_, dir, finish, gm) {
if (!gm.integration)
return finish();
var im = _._options.imageMagick;
var test = gm(__dirname + '/fixtures/iptc-multiple.jpg');
if (im) test.options({ imageMagick: true });
test.identify(function (err) {
if (err) return finish(err);
var d = this.data;
if (im) {
var iptc = d['Profiles'] && d['Profiles']['Profile-iptc'];
var keywords = iptc['Keyword[2,25]'];
assert(Array.isArray(keywords));
assert.equal(keywords.length, 5);
// just make sure another value
assert(! Array.isArray(iptc['Headline[2,105]']));
}
finish();
});
}