diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-06 19:50:31 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-06 19:50:31 +1000 |
| commit | c0f7b0672917d8fe207acafc89a25e246cc43441 (patch) | |
| tree | be59749858565705cff2e455fc89d236ce1226ea /src | |
| parent | thumbnailer: add configs (diff) | |
| download | caelestia-shell-c0f7b0672917d8fe207acafc89a25e246cc43441.tar.gz caelestia-shell-c0f7b0672917d8fe207acafc89a25e246cc43441.tar.bz2 caelestia-shell-c0f7b0672917d8fe207acafc89a25e246cc43441.zip | |
thumbnailer: fix exact sizing creating background
Use `-background none` to prevent
Diffstat (limited to 'src')
| -rw-r--r-- | src/utils/thumbnailer.ts | 4 |
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()) { |