derf / feh

a fast and light image viewer
https://feh.finalrewind.org
Other
1.52k stars 159 forks source link

Feature request: blurry sides for portrait photos #473

Open ezzyfezzy opened 5 years ago

ezzyfezzy commented 5 years ago

First of all - feh is the best tool ever made for creating raspberry based digital slideshow photoframe!

Only problem is that OLED displays cannot stand (burn-in problem) non-filled zoom options, but with the "filled" option portrait mode photos will not be too zoomed. I wonder if it's possible to automatically extend portrait images by adding blur to sides (example https://i.ytimg.com/vi/yCOrqUA0ws4/maxresdefault.jpg). This may keep OLED displays safe.

Ferada commented 5 years ago

You might be able to script something with ImageMagick for this, like with that picture the following will do what I think you want by scaling up to 1024px width, blurring, then adding the original on top and cropping to the original height (adjust as necessary):

convert max.jpg -resize 1024x -blur 0x8 -gravity center max.jpg -composite -crop x`convert max.jpg -format "%h" info:`+0+0 max-blurred.jpg
justinlovinger commented 5 years ago

I would like to second this request, and note that blurred borders are just as useful when setting a desktop wallpaper. Blurred borders look much nicer than black bars. I use a random slideshow of images for my wallpaper. Some images are portrait or a non-standard aspect ratio. A user might have multiple monitors with varying aspect ratios, so preprocessing is not an option.

KDE Plasma desktop has an option for blurred borders when scaling wallpaper images, so you may be able to look there for implementation ideas.

An alternative, that would allow the user to implement this and other functionality, is to support a "preprocess" command that would run on an image before it is set as the wallpaper.