Automated Larger Cover Finder
Right now, when you grab metadata for a book, it'll search the various sources given for alternative covers. The results may or may not be a good match and may or may not be larger/better than the existing cover. The covers are sorted by size, so oftentimes a higher quality/size replacement is not the first on the list. This makes looking for larger covers require a lot of cognitive overhead.
While that part of Calibre that normally handles downloading/choosing covers is probably not really 'touchable' code (is it?). It shouldn't be too difficult to write a plugin that:
- Downloads alternative book covers for a book (probably need to throttle the requests to avoid getting blocked)
- Rejects any candidates smaller than the existing cover
- Generates a histogram of the existing cover image and remaining candidates
- Automatically replaces the existing cover with the downloaded match that is larger/better, or at least provides a list sorted by histogram similarity so that a likely better cover is shown first.
I have not actually tried doing cover comparisons this way, so I have no idea how effective it would actually be. I do know that a lot of "Duplicate image finder" apps use histograms to compare identical pics of different sizes.
Ideally, it'd be something you could run against a library or individual book with options for minimum size to seek replacements and/or minimum size increase and, of course, the ability to accept/decline. Possibly even a 'minimum match' for comparing histograms.
I've not looked into what it takes to interface with Calibre, but the histogram comparison element seems like it'd be fairly easy to implement.
Last edited by StickyC; 01-25-2025 at 12:57 PM.
|