eleybourn/Book-Catalogue — Issue #285: Keep resized thumbnails for later use (and store covers in a DB?)
Author: Grunthos
Created: 2012-01-20 00:01:58+00:00
State: open
Labels: Defect, Feature, Wishlist

I have a selection of cover images ranging in size from 3k to 1.6MB. Scrolling through a list of books with covers displayed can become very sluggish when it hits one of the larger cover images.

I have experimented with creating permanent resized thumbnail versions if the thumbnail size is less than 10% of the original, and it works well: scrolling is smooth once again.

The problem is that my SD Card is formatted as a FAT file system with a minimum allocation of 32k. This means that while my resized thumbnails have a total size of 883 KILO bytes, they actually consume 18 MEGA bytes of storage.

The same is true for all downloaded covers: a 4k downloaded cover consumes 32k on the sdcard.

So there are three suggestions:

1. Build thumbnails for covers whhen the thumbnail is less than 10% of the original.

2. Store the new thumbnails in a DB on the sdcard (or wherever cover images are stored). Or perhaps in the main DB since they are quite small.

3. Consider storing all cover images in the tumbnails database (wherever that may be).

If we went with option (3) as well, we might do well to store some extra data with the covers, including a unique ID, and add cover_id to the books tale (to avoid the export/import problem where covers become mismatched). We might also want to record the original source of the file (URL or camera) as well as the image size and format.