HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: pyr452 on 2022-05-01 22:00:27

Title: Album Art Viewer resizing quality
Post by: pyr452 on 2022-05-01 22:00:27
Is there a way to increase the resizing/resampling quality of the integrated Album Art Viewer by configuration?
Or do I need to dive into some 3rd party component for that purpose?
If yes, which one?
Title: Re: Album Art Viewer resizing quality
Post by: pyr452 on 2022-05-02 08:06:57
Attached you can find an illustration what I mean.
The top left is what it looks like.
The bottom right is the resizing quality I expected and see on many screenshots of more advanced foobar2000 users.
Title: Re: Album Art Viewer resizing quality
Post by: musicmusic on 2022-05-02 11:42:09
Are you using Wine (as per a previous post)?

That would be the most likely cause of any discrepancy. Your screenshot looks like Columns UI, which is using the highest quality algorithm GDI+ offers, which Wine doesn't seem to implement. You should get a better result with a native Gdiplus (but possibly other problems instead).
Title: Re: Album Art Viewer resizing quality
Post by: kode54 on 2022-05-02 11:58:54
Yeah, Wine GDI+ doesn't support any form of resampling or antialiasing. For instance, all of the built-in visualizers will be rendered without any antialiasing on any of the lines or shapes, just on the text.

Installing the Windows XP version of gdiplus.dll with Winetricks will "fix" this, but it will run incredibly poorly, because it doesn't support any sort of acceleration of the rendering, not even using SIMD math functionality of the CPU. The visualizers will become impossibly slow, especially if you attempt to run them full screen.
Title: Re: Album Art Viewer resizing quality
Post by: pyr452 on 2022-05-02 12:01:06
Yes, I'm using Wine and copied the system32/gdiplus.dll from my Win10 installation inside the foobar2000 directory.
Shouldn't that be sufficient? Or do I need to run winetricks gdiplus?

I typicaly use the Default UI but installed Columns UI to see if that makes a difference.
Title: Re: Album Art Viewer resizing quality
Post by: musicmusic on 2022-05-02 12:29:10
If you run foobar2000 using Wine in a terminal, and see messages like fixme:gdiplus:resample_bitmap_pixel Unimplemented interpolation <number> then it's using the Wine version of Gdiplus.

You could create a new Wine prefix and run winetricks gdiplus in that to test what difference it makes.
Title: Re: Album Art Viewer resizing quality
Post by: pyr452 on 2022-05-02 13:27:55
You could create a new Wine prefix and run winetricks gdiplus in that to test what difference it makes.
winetricks gdiplus indeed did the trick and it's only slightly slower for album artwork than Wine's built-in GDI+ implementation that lacks resampling. Thanks for that.
Visualization performance isn't an issue for me, since I don't use any.

I tried forcing usage of a Win10 gdiplus.dll inside the foobar2000  folder via winecfg, which resulted in foobar2000 not starting.
The same happened when trying winetricks gdiplus_winxp.

Maybe my post helps someone in the future running into the same issue.
Title: Re: Album Art Viewer resizing quality
Post by: kode54 on 2022-05-05 04:09:22
The Windows 10 version, much like any version newer than the Windows XP version, do not work under Wine. The Winetricks verb fetches the XP version and installs it for you.
Title: Re: Album Art Viewer resizing quality
Post by: marc2k3 on 2022-05-05 11:11:26
With winetricks, gdiplus and gdiplus_winxp are 2 distinct options. The first extracts the file from Windows 7 SP1, the latter is a tiny download by comparison.

https://github.com/Winetricks/winetricks/blob/f7f702f270728dce780773445f0e189645f8a836/src/winetricks#L10266L10301

From recent threads, using Wine7 or later seems to be good enough without using winetricks but of course YMMV.