Thread: Touch .kepub.epub
View Single Post
Old 01-20-2013, 07:48 AM   #15
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Getting covers back

For those who are missing the covers when the use ".kepub.epub" books, there is a "simple" fix. For a couple of reason, today I loaded some ePub3 books. These had to be .kepub.epub to use the kepub reader. I was surprised when the books turned up in the library with a cover. I opened up the files to see how the cover was specified. The OPF file, in the <manifest> section, had the following line:

Code:
<item media-type="image/jpeg" id="cover" href="cover.jpg" properties="cover-image"></item>
When I looked at an ePub2, the equivalent line didn't have the "properties". I added this to the epub, copied it to the device, changed the extension and disconnected. The cover image was extracted and displayed correctly.

An interesting thing is that the cover image is used directly. For epubs, the device generates the first page of the book and uses that as the cover image. With the above, the it seems the image is extracted from the file and used.

With the usual "don't try this at home", "make sure you know what you are doing", "it's not my fault if you mess it up", to add this in calibre:

- Select the book
- Right click on it and select "Tweak Book"
- On the dialog that opens, press "Explode book". A window will open with the contents of the book.
- Find the OPF file. It is usually called "package.opf" or "content.opf". This file contains XML.
- Edit the OPF file. In Windows I use Notepad++ but Notepad should be OK.
- Find the "<manifest>" section.
- Somewhere before the "<manifest>" line, should be a line similar to above or the following.
Code:
<item href="Images/cover.jpg" id="cover.jpg" media-type="image/jpeg" />
- Add properties="cover-image" within the tag. THe above would then look like:

Code:
<item href="Images/cover.jpg" id="cover.jpg" media-type="image/jpeg" properties="cover-image" />
- Save the changes and close the window with the files in it.
- On the calibre window, press the "Rebuild Book" button.

The epub is now ready to be put on your Kobo device with the appropriate extension.
davidfor is offline   Reply With Quote