I like having pretty covers on my Kindle/Mobipocket books. They are displayed by some of my reading devices, and they also show up on my Mac, thanks to my
QuickLook plugin.
But changing covers on a Mobipocket/Kindle book isn't easy. At least, it's not easy without doing a conversion in calibre, which also re-works all the text coding and metadata of the book.
Now, I've been playing around with the Kindle/Mobipocket file structure for quite a while (e.g. MobiUnpack) so I decided to write a special purpose cover replacement script. It only replaces the cover image and/or thumbnail image in the file. It changes nothing else.
So, for Mac users, I've also written an AppleScript wrapper. (The python script is embedded, so Mac users only need to download the AppleScript.)
Drag a Kindle/Mobipocket file onto the AppleScript wrapper. A dialog pops up asking you to select an image. Then the new file is created in the same folder as the old file. It's just the same, but with a new cover image, AND a new thumbnail image. The AppleScript creates a 240 pixel thumbnail image from the cover image automatically, and inserts it into the file along with the cover image.
For non-Mac users, the script now includes a tkInter interface, allowing original file, cover image, thumbnail image and output file to be chosen simply.
This script only works with newer Mobipocket files with an EXTH section and metadata identifying the cover and thumbnail images. (All Amazon Kindle Mobipocket format books are like this, and yes, this script does work with the new Amazon KF8/AZW3 format ebooks.)
Amazon recommend that images be below 127KiB (which this script enforces). I'd recommend pixel dimensions of at least 800 tall, and 1024 might be better.
I'd love to get feedback on the AppleScript or the python script.
[Edit: 1.02 now includes a tkInter interface, and works on Windows with files with unicode files names.]