summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/thumbnailer.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/thumbnailer.ts b/src/utils/thumbnailer.ts
index 0f9448c..d23dab1 100644
--- a/src/utils/thumbnailer.ts
+++ b/src/utils/thumbnailer.ts
@@ -34,7 +34,9 @@ export default class Thumbnailer {
try {
const width = this.getOpt("width", opts);
const height = this.getOpt("height", opts);
- const cropCmd = this.getOpt("exact", opts) ? `-gravity Center -extent ${width}x${height}` : "";
+ const cropCmd = this.getOpt("exact", opts)
+ ? `-background none -gravity center -extent ${width}x${height}`
+ : "";
await execAsync(`magick ${path} -thumbnail ${width}x${height}^ ${cropCmd} -unsharp 0x.5 ${thumbPath}`);
} catch {
if (attempts >= config.maxAttempts.get()) {