|
Server IP : 10.107.20.4 / Your IP : 216.73.217.92 Web Server : Apache System : Linux webm004.cluster107.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : simfexinjt ( 803937) PHP Version : 7.1.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/simfexinjt/www/wp-includes/../wp-admin/../node_modules/gulp.spritesmith/test/utils/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
var fs = require('fs');
var pngparse = require('pngparse');
// Modified from https://github.com/mikolalysenko/get-pixels/blob/2ac98645119244d6e52afcef5fe52cc9300fb27b/node-pixels.js
// due to lack of loading '.jpg' as a '.png'
exports._loadImage = function (filepath, cb) {
fs.readFile(filepath, function (err, buff) {
if (err) {
return cb(err);
}
pngparse.parse(buff, cb);
});
};
exports.loadActual = function (filepath) {
before(function (done) {
var that = this;
exports._loadImage(filepath, function (err, pixels) {
that.actualPixels = pixels;
done(err);
});
});
};
exports.loadExpected = function (filepath) {
before(function (done) {
var that = this;
exports._loadImage(filepath, function (err, pixels) {
that.expectedPixels = pixels;
done(err);
});
});
};