mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
19 lines
553 B
JavaScript
Executable File
19 lines
553 B
JavaScript
Executable File
var sharp = require("./build/Release/sharp");
|
|
|
|
module.exports.buffer = {
|
|
jpeg: "__jpeg",
|
|
png: "__png"
|
|
};
|
|
|
|
module.exports.crop = function(input, output, width, height, callback) {
|
|
sharp.resize(input, output, width, height, "c", callback);
|
|
};
|
|
|
|
module.exports.embedWhite = function(input, output, width, height, callback) {
|
|
sharp.resize(input, output, width, height, "w", callback);
|
|
};
|
|
|
|
module.exports.embedBlack = function(input, output, width, height, callback) {
|
|
sharp.resize(input, output, width, height, "b", callback);
|
|
};
|