Downsampled Images in eBooks for PubIt!: How to Fix the Problem

Well, I spent most of the past week converting Book Formatting for Self-Publishers into different ebook formats–specifically for Smashwords, PubIt!, and into a high quality, clickable PDF (solution not in this post). An “easy” project turned into a nightmare. Why?

In a word, images. Book Formatting for Self-Publishers has approximately 150 images in the book. For the Kindle ebook, most were 96 dpi screenshots, and for the print book, I converted them all to 300 dpi, black and white. Reinserting 150 images takes a long time, by the way. When the print version was finished, I thought the hard part was over. After all, I’d already uploaded the book to KDP and the images in the .mobi format turned out fine. Not so when I next uploaded the same Microsoft Word .doc to PubIt!

When I checked the images in the NOOK Previewer, the images were awful, to put it nicely. What happened? I checked out the images in the html file made when I converted the Microsoft Word doc into a “Web page, filtered” for Kindle. The images were downsampled. One example: One image was 320 KB when originally inserted into the MS Word 2003 doc, and when the “Web page, filtered” was made, the image was downsampled to 24 KB. Still, the pictures are clear in the .mobi format on Kindle. Why wasn’t that the case when I uploaded that same MS Word doc file to PubIt!? My guess is that PubIt! converts the images differently than KDP.

So, how does one format a book for PubIt! that will keep the same image quality for pictures as Kindle does? After much experimenting, I discovered a simple solution to the problem. I downloaded the .mobi file from KDP to my computer. Then I uploaded that same .mobi file to Calibre, and then converted it to ePUB. Then I uploaded the ePUB to PubIt! And it worked! The images looked great.

Well, there was one tiny little problem–at least it was a problem for a perfectionist, like me. I’d already included a cover image in the ebook. When you convert an ebook from one format to another in Calibre, Calibre offers the option of uploading a cover image into the ebook. Initially, I disregarded this option, since I had already included a cover image in the ebook. However, when I checked the file in the NOOK previewer, a generic Calibre title page image showed up in the ebook, just before my cover image. I did not want that. So, I went through the process again, and this time uploaded my cover image in Calibre. Now my ebook had two images–the one Calibre input for the “title page,” and the original cover that I had in the book. What was more, the Calibre cover was distorted!

Now what to do? I had the bright idea of removing the cover image from my original Microsoft Word doc, reconverting to .mobi, and then uploading to Calibre, and when converting to ePUB, I uploaded the cover image through Calibre. All good now, with only one cover image, right? Well, if you don’t mind distorted cover images, I suppose everything was just peachy. As a perfectionist, however, I could not let that go, and learned how to fix that, too. If you’re one who’s not afraid to “get under the hood” of an ePUB file and tinker with code, here is the solution:

Convert the ePUB file to a zip file. (Change the file extension from .epub to .zip)

Extract the zip file into a folder–let’s name it EPUBFolder. (This folder cannot be located in the ePUB zip file.)

Open the titlepage.xhtml file in Notepad. Find the following code snippet:

Replace it with:
preserveAspectRatio=”xMidYMid meet”

Save the file.

Now, make a new, empty zip file. Then copy the mimetype file from the EPUBFolder first, and paste it into your new zip file. Then copy all of the remaining files from your EPUBFolder (except the mimetype file) and paste them into your new zip. Rename the zip extension to .epub. Upload it to PubIt, and check it in the NOOK previewer. No more distorted cover image!

You’re done! See how easy that was?

I’m happy with how the Kindle and PubIt! versions turned out. Smashwords turned out to be a different story. Although I downsampled all of my images and reinserted all 150 into a new document just for Smashwords, the file still was almost 10 MB; Smashwords only allows 5 MB. I console myself for all that wasted time by thinking, maybe Smashwords would have downsampled the images even more… and I couldn’t have fixed that. (An Update: I’ve learned since then that Smashwords does downsample images (in the ePub version, at least).)

Look for the book at Amazon and Barnes & Noble.

This entry was posted in Book Formatting, Format a Book, Format eBooks and tagged , , , , , , . Bookmark the permalink.