I threw this together in an afternoon…
I wanted an easy way to make screensaver images for my ereader from epubs. Ereader screensaver images must be grayscale and generally 600×800. This code accepts a directory of DRM-free epubs and pulls out the cover from each and optionally resizes to 600×800 and optionally converts to grayscale.
Source code and instructions are at https://github.com/brianpipa/epub-cover-extractor
Latest version is at https://pipasoft.com/downloads/epub-cover-extractor/
Example image it can create from your ebook: