Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify cover sizes by using blur effect #580

Closed
JanPokorny opened this issue May 10, 2018 · 8 comments
Closed

Unify cover sizes by using blur effect #580

JanPokorny opened this issue May 10, 2018 · 8 comments
Milestone

Comments

@JanPokorny
Copy link

Game covers aren't usually the same size, which may look visually unpleasing. The same trick used for converting portrait videos to landscape may help:

Before:

obrazek

After applying the cover, stretched (with aspect ratio preserved), centered, cropped and gauss-blurred as a background:

obrazek

I'm not sure if it helps much, visually... But it may be a backup solution if there is no way to download uniform covers.

@Continous
Copy link

You could also do it with one of my favorite methods, which is to superimpose the scale image over a guassian blurred 2x larger image and vignette. Demonstrations here:

Example of Album Art Gaussian Blur

@Mates1500
Copy link
Contributor

I suppose this is not being worked on? I could try out both methods and see which fares better, although just from looking at those images I feel the superimposition is more elegant/overall consistent.

However, looking at the comment here it would mean that a whole lot of transformed images at different aspect ratios would potentially have to be stored (but practically speaking, people are most likely not gonna change themes like socks).

@JosefNemec
Copy link
Owner

No it's not being worked on and by research I did a while ago it would mean noticeable performance hit on views with a lot of images (the default blurring in WPF is not that great). What I currently plan for 5.0 is to add an option to automatically crop/fit the image to unified sizes.

@DennoCoil
Copy link

DennoCoil commented Feb 15, 2019

@Mates1500 It would have to be a pre-baking feature where it'd have to make a picture with blurring when downloading metadata or as a single\batch action. (Several Playnite users here said they have a collection of 5k-15k games.) Doing it in real-time would be very CPU or GPU intense.

@Mates1500
Copy link
Contributor

@JosefNemec is the WPF crop operation fast enough for realtime so that it doesn't heavily affect performance?
My original intention was to cache/bake the images with the blur effect and show those instead in case the aspect ratio of the cover is a little off.
ImageProcessor is a nice lightweight library capable of producing gaussian blur for example.

In case of caching for crop, we could perhaps let the user choose in settings which method they'd prefer to consolidate the dimensions? Either the blur or crop.

@JosefNemec
Copy link
Owner

I'm not going to change the image it self, only the way it's displayed (WPF's Image control has a support for various display "fitting" options). We already use the same functionality for scaling down the image, performance shouldn't be affected.

@JosefNemec JosefNemec added this to the 5.0 milestone Jun 6, 2019
@JosefNemec
Copy link
Owner

Done in 5.0

@tylerszabo
Copy link
Contributor

tylerszabo commented Nov 8, 2019

In case anyone comes looking in this thread for methods I was able to approximate the way Steam is doing blurring for games with banners only

image

& magick convert $in_file `
-blur "0x15" `
'(' -clone 0 -gravity north -crop "100%x10%+0+18%" ')' `
'(' -clone -1 -flip ')' `
'(' -clone 0 -gravity south -crop "100%x12%+0+17%" -flip ')' `
'(' -clone -1 -flip ')' `
'(' -clone -1 -flip ')' `
'(' -clone -1 -flip ')' `
'(' -clone -1 -flip -gravity south -crop "100%x50%" ')' `
-delete 0 -append `
-set option:distort:viewport "%wx%[fx:w*3/2]" -virtual-pixel background -distort SRT "0,0 1,%[fx:(w*3/2)/h] 0 0,0" `
'(' $in_file -set option:distort:viewport "%[fx:u.w]x%[fx:u.w*3/2]+0-%[fx:(u.w*3/2-u.h)/3]" -virtual-pixel none -distort SRT "0" ')' `
-gravity north -composite $out_file

What's still missing is there's a slight rounded darken/saturate effect at the bottom and a corner lighten effect in the top right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants