PDA

View Full Version : Automatic artwork resizing



lemmy999
2007-01-29, 10:37
I know that if you have a cover.jpg file that is 300x300 it will resize on the fly to 100x100 for viewing in Slimserver album view. I was considering trying to make a 100x100 thumb.jpg in each directory so that the artwork will load faster when I am using SServer from a remote location over the internet. But will this help at all? Does the resize happen on the server and then the smaller 100x100 image is sent to the remote location or does it send the 300x300 image and the resize happens at the remote location?

gerph
2007-01-29, 12:21
I know that if you have a cover.jpg file that is 300x300 it will resize on the fly to 100x100 for viewing in Slimserver album view. I was considering trying to make a 100x100 thumb.jpg in each directory so that the artwork will load faster when I am using SServer from a remote location over the internet. But will this help at all? Does the resize happen on the server and then the smaller 100x100 image is sent to the remote location or does it send the 300x300 image and the resize happens at the remote location?

Resizing is done on the server. However, I believe that the use of the thumbnail jpegs in the directory (ie 'thumb.jpg', or whatever you would have configured it as) vanished from the server in 6.5.

This is one reason why (IMO) trying to view album art is far slower with the later versions - it has to resize the images on the server before serving them, whereas previously it'd just pick up the thumbnail graphic which had been pre-sized correctly and serve that.

Triode
2007-01-29, 12:44
The resized images are cached on the server in 6.5.1 for 10 days so you should only see the hit of resizing the first time you browse your collection [and if you only do it rarely!]

morberg
2007-01-29, 14:07
The resized images are cached on the server in 6.5.1 for 10 days so you should only see the hit of resizing the first time you browse your collection [and if you only do it rarely!]
Is it possible to extend the caching from 10 days? I'd be happy to trade disk space for performance.

Triode
2007-01-29, 14:49
Its hard coded into the server at present and looking at the caching code used does mean cached images are always exired after 10days (even if you use them frequently).

So what do people think a better time would be? - downside of being bigger is that it uses up disk space and slows down server start up as the server checks all the files for expiry on startup.

JJZolx
2007-01-29, 15:09
Its hard coded into the server at present and looking at the caching code used does mean cached images are always exired after 10days (even if you use them frequently).

So what do people think a better time would be? - downside of being bigger is that it uses up disk space and slows down server start up as the server checks all the files for expiry on startup.

Shouldn't proper caching note the last time that a file was accessed and then _extend_ its expiry from that time?

Triode
2007-01-29, 15:11
Agreed, but having looked at the CPAN perl Cache::FileCache module which is used I'm not convinced it does this.. Someone feel free to put me right on it.