Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function loadTIFF(data) {
let result = decodeTiff(data);
if (result.length === 1) {
return getImageFromIFD(result[0]);
} else {
return new Stack(result.map(getImageFromIFD));
}
}