Automatically re-scale local album artwork

Volumio should re-scale and cache album artwork as needed to improve web-app performance.

Caching is already done, scaling will mean a big big performance hit (image resizing is very cpu intensive, and you don’t want it to happen on your music listening machine…)
There is a setting to set the albumart size, but this applies to internet covers.

Hey Michaelangelo

I have not looked into the album-art size setting, as I don’t use internet album artwork. All my artwork is stored locally.

I don’t see the performance issue:

If the existing album-art size setting already causes internet album artwork to be re-scaled, then I’m actually not asking for anything new. I’m then just asking for existing features to be applied more generally, rather than it being a special case which is applicable only to artwork that is downloaded from the internet.

If the existing album-art size setting doesn’t re-scale anything and just influences what is downloaded, then scaling would genuinely be something new. Even then however, that could be integrated into the media library rescan/update process, during which performance isn’t a huge concern as the Volumio device will be busy either way. If this did cause a noticable performance hit, it would be incurred but once, because if the re-scaled image already exists there is no reason to create it again. Furthermore, after the first/initial scan, album artwork re-scaling could be relegated to a background task which is executed only when the system is idle. Then users would notice nothing at all during everyday use.

I suspect this would add a second image file to album folders, something like this:

folder.jpg (the original and possibly high resolution artwork. It’s the default that is used if no explicitly re-scaled versions exist)
folder-300x300.jpg (name based on the album art size setting?)

After the rescan/update is complete, this feature would have no negative performance impact at all. Even if this were implemented in a way that causes the rescan/update process to take slightly longer, it would still be much faster than the manual process I go through now.

On the other hand, scaling and saving a copy of the resolution-optimized artwork would provide these benefits:
[list=]
[] The artwork size setting would apply to local artwork just as it would to internet artwork (no special cases, which is how most people would expect the size setting to work)
[
] Volumio web-app load/start times would be more deterministic. This would become solely a function of hardware and the number of tracks, which is behaviorally more predictable as it is then no longer influenced by album artwork size, which you currently have no control over.
[*] Those who (a) manage their own high-quality album artwork and (b) use the Volumio web app and:
[1] employ a shared/single audio file repository, would no longer have to choose between very high quality artwork OR artwork which the Volumio web-app can load in a reasonable amount of time.
[2] employ a dedicated audio file repository specifically for Volumio, would no longer have to maintain, sync and rename their re-scaled album artwork manually.
[/list]