mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
parent
d420f6cb27
commit
0f50dbde92
4 changed files with 34 additions and 12 deletions
|
@ -17,7 +17,7 @@ module.exports = {
|
|||
},
|
||||
|
||||
async fn(inputs) {
|
||||
const image = sharp(inputs.file.fd, {
|
||||
let image = sharp(inputs.file.fd, {
|
||||
animated: true,
|
||||
});
|
||||
|
||||
|
@ -37,7 +37,11 @@ module.exports = {
|
|||
|
||||
fs.mkdirSync(rootPath);
|
||||
|
||||
const { width, pageHeight: height = metadata.height } = metadata;
|
||||
let { width, pageHeight: height = metadata.height } = metadata;
|
||||
if (metadata.orientation && metadata.orientation > 4) {
|
||||
[image, width, height] = [image.rotate(), height, width];
|
||||
}
|
||||
|
||||
const extension = metadata.format === 'jpeg' ? 'jpg' : metadata.format;
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue