View Single Post
Old 07-29-2019, 08:35 AM   #1906
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
Quote:
Originally Posted by lumpynose View Post
Thanks guys, now I'm more confused than I was previously.

I installed the Generate Cover plugin, which makes nice covers. But it only makes the jpg cover file and puts it in the folder that Calibre has the epub in. It doesn't modify the epub file and add the cover to it.

But the Kobo extended driver has the option for uploading covers, which I turned on. After uploading the book the epub file size on the Kobo is larger, and opening the epub on the Kobo with Sigil shows the cover.jpg file in the Images directory and Sigil says it's a Cover Image. But when I unplug the Kobo and open the epub on the Kobo with its ereader the margins are still hosed.

So then I tried using the Modify ePub plugin. It adds the image to the epub and also creates a titlepage.xhtml file and when that is sent to the Kobo everything is fine; no wacko margins. But there's an annoying waste of space with the Modify ePub plugin because it creates a copy of the cover.jpg named cover.jpeg, which is what it uses for the titlepage.xhtml file, and then it puts both cover.jpg and cover.jpeg in the Images folder in the epub.

KoboUtilities has a thing to clean the images directory of extra images but it doesn't affect the epub file. The Quality Check plugin has things for checking for missing covers but that only looks for the cover.jpg files in the folder the epub is in within Calibre's library.

So I'm somewhat mystified about the cover.jpg file in the Calibre folders. Apparently Calibre generates one when an epub is added (an epub that doesn't have a cover image) and uses the text from the first page or so.

I'm also wondering if you guys realized that it would be a two step process to properly add a cover with the titlepage.xhtml file, which solves the margin problem. Having an image marked as a cover is insufficient; it needs the titlepage.xhtml as well.
Actually, I never said to generate a cover. What I said was that Polish books or Modify ePub plugin would add the cover to the book. The assumption was that you already have a cover image in your calibre library. As you noticed, calibre will usually generate one from the book when you add it to the library. This could be using an image file in the book, or by rendering the first page and using it. For books formats don't have a cover, such as TXT files, they have to be sourced elsewhere. Or, the cover image can be added by other methods, such as the two cover generating methods mentioned, or using a metadata source plugin. And I assumed you would be doing the latter to get a decent cover image to display.

For the actual books, what is the cover depends on the format. And the reader device or app. The epub format, can define a cover image separately to what is shown when reading. It is very common that the cover image is shown on the first page. But, it isn't mandatory. Or, a different image could be used. The first page could be optimised for reading, and the cover image optimised for display elsewhere. On a Kobo ereader, for ePubs, the first page is used as the cover. For kepubs, it is the image marked as the cover in the OPF. Also, the epub or kepub is self-contained format. Everything is contained inside it. This includes the cover image if there is one.

For a kepub, there is also something else. The first file in the book is treated differently. It is treated as a fixed-layout. That is why you see the strange formatting when that first file just contains text.

The extended driver isn't going to add the cover. It assumes the book is ready to be transformed to a kepub and put on the device. And that means someone has thought about what is the cover and added it to the book. Once you have the cover added to the book in the library, the methods mentioned, conversion, Polish book and the Modify ePub plugin are all ways to add the cover to the book. Or you can edit the book and add the cover yourself. For an PG sourced book, splitting the first file so that the title is in a separate file at the start will probably work. Or adding an extra file with the title in text will work.

And the driver cover upload is separate again. That is there to send the cover image from the calibre library to the device rather than letting the device do its thing for generating a cover images. These cover images have nothing to do with reading the book. They are what are displayed in in the book lists, the book details page or the screensaver. It is also useful for the formats that do not contain something that can be used as a cover or cannot be updated with the cover.
davidfor is offline   Reply With Quote