mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Update messages-media.ts
This commit is contained in:
@@ -111,7 +111,7 @@ export const extractImageThumb = async(bufferOrFilePath: Readable | Buffer | str
|
|||||||
height: dimensions.height,
|
height: dimensions.height,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
} else if('jimp' in lib && typeof lib.jimp.read === 'function') {
|
} else if('jimp' in lib && typeof lib.jimp?.read === 'function') {
|
||||||
const { read, MIME_JPEG, RESIZE_BILINEAR, AUTO } = lib.jimp
|
const { read, MIME_JPEG, RESIZE_BILINEAR, AUTO } = lib.jimp
|
||||||
|
|
||||||
const jimp = await read(bufferOrFilePath as any)
|
const jimp = await read(bufferOrFilePath as any)
|
||||||
@@ -160,7 +160,7 @@ export const generateProfilePicture = async(mediaUpload: WAMediaUpload) => {
|
|||||||
quality: 50,
|
quality: 50,
|
||||||
})
|
})
|
||||||
.toBuffer()
|
.toBuffer()
|
||||||
} else if('jimp' in lib && typeof lib.jimp.read === 'function') {
|
} else if('jimp' in lib && typeof lib.jimp?.read === 'function') {
|
||||||
const { read, MIME_JPEG, RESIZE_BILINEAR } = lib.jimp
|
const { read, MIME_JPEG, RESIZE_BILINEAR } = lib.jimp
|
||||||
const jimp = await read(bufferOrFilePath as any)
|
const jimp = await read(bufferOrFilePath as any)
|
||||||
const min = Math.min(jimp.getWidth(), jimp.getHeight())
|
const min = Math.min(jimp.getWidth(), jimp.getHeight())
|
||||||
|
|||||||
Reference in New Issue
Block a user