mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
8 lines
250 B
JavaScript
8 lines
250 B
JavaScript
var sharp = require('sharp');
|
|
|
|
module.exports = function(result, physicalPath, mimeType, maxWidth, maxHeight) {
|
|
sharp(physicalPath)
|
|
.resize(maxWidth > 0 ? maxWidth : null, maxHeight > 0 ? maxHeight : null)
|
|
.pipe(result.stream);
|
|
}
|