refactoring
This commit is contained in:
parent
6333d6291d
commit
acecd5b502
@ -183,7 +183,11 @@ async function extractTextFromStandardDocument(inputPath) {
|
||||
withoutEnlargement: false,
|
||||
})
|
||||
.grayscale()
|
||||
.normalize({ lower: 0.1, upper: 0.9 })
|
||||
// Sharp attend des bornes entières 1..100 pour lower/upper (percentiles)
|
||||
// Ancien réglage (0.1/0.9) provoquait une erreur. On utilise 10/90.
|
||||
.normalize({ lower: 10, upper: 90 })
|
||||
// Voir commentaire ci-dessus: clamp en 1..100
|
||||
.normalize({ lower: 10, upper: 90 })
|
||||
.sharpen()
|
||||
.png()
|
||||
.toBuffer()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user