Skip to content

Fix for IMAGEMAGICK_FIT_WITH_BLUR command#838

Merged
jlu5 merged 1 commit intovarietywalls:masterfrom
dp-alvarez:fix_fit_with_blur
May 3, 2026
Merged

Fix for IMAGEMAGICK_FIT_WITH_BLUR command#838
jlu5 merged 1 commit intovarietywalls:masterfrom
dp-alvarez:fix_fit_with_blur

Conversation

@dp-alvarez
Copy link
Copy Markdown
Contributor

@dp-alvarez dp-alvarez commented May 2, 2026

For quite a while I noticed the "Fit within screen, pad with a blurred background" option was broken on my system.
It generated a fully blurred image without the original overlaid on top.
Looking at the git blame I see no changes there, so maybe it was a change in imagemagick itself.

Looking at my logs, this was the imagemagick command, that when run isolated was in fact generating the fully blurred image:

magick input.jpg \
	-resize 2560x1440^ -gravity center -extent 2560x1440 -scale 10% -blur 0x3 -resize 1000% \
	-clone 0 -resize 2560x1440 -size 2560x1440 -gravity center \
	-composite output_old.jpg

This is the new command, that works as expected:

magick input.jpg \
	-write mpr:src +delete \
	\( mpr:src -resize 2560x1440^ -gravity center -extent 2560x1440 -scale 10% -blur 0x3 -resize 1000% \) \
	\( mpr:src -resize 2560x1440 -background none -gravity center -extent 2560x1440 \) \
	-composite output_new.jpg

Surprised I didn't see any bug reports related to this. Even if this is isolated to Debian testing or whatever, the new imagemagick command is more explicit and shouldn't break any system.

magick --version
Version: ImageMagick 7.1.2-18 Q16 x86_64 23822 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/license/
Features: Cipher DPC Modules OpenMP(4.5) 
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png raw tiff webp wmf x xml zlib zstd
Compiler: gcc (15.2)

Here is a image comparing the two outputs for a portrait image, one where Variety's auto-mode would choose "Fit within screen, pad with a blurred background" fitting.

comparision

Disclaimer: The imagemagick command was partially generated by a LLM, but from my review seems correct and straightforward enough (I'd argue simpler than the original).

@jlu5 jlu5 merged commit a702215 into varietywalls:master May 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants