EPUB cover replaced when "Edit Book" is selected

Bug #1618970 reported by Jeff Rife
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

With Calibre 2.65.1 64-bit on Windows 7 64-bit:

Whenever "Edit book" is used on an EPUB, the cover image in the EPUB is silently replaced with the cover in the calibre database.

Steps to reproduce:
1. Import an EPUB file into calibre.
2. Update the cover in the calibre database (download, etc.). Make sure the cover is radically different, so you can see the issue.
3. Choose "Edit Book" from the menu.
4. Note that the cover image is now the same as the one in the database.

This change happens and is saved even if you don't save the EPUB. In addition, the cover page is not changed to match the new image (which might be a different size), so there might be issues with display. Last, this can result in a cover image larger than desired in the EPUB.

Revision history for this message
Eli Schwartz (eschwartz) wrote :

Edit ==> Preferences ==> Integration with calibre

Uncheck "Update metadata embedded in the book when opening"

Changed in calibre:
status: New → Invalid
Revision history for this message
Jeff Rife (g-uduntu-5) wrote :

It's still a bug, because covers are treated differently than other metadata by calibre...they are size-limited, for example. Also, if the aspect ratio of the new cover is radically different from the old one, the book will display incorrectly until coverpage.xhtml (or the equivalent) is updated.

Revision history for this message
Eli Schwartz (eschwartz) wrote :

That happens on Send-to-Device, Save-to-Disk, Embed Metadata, etc. as well...

So it is not "still" a bug, though you are welcome to consider it a different bug.
I suspect Kovid will just say that it isn't supposed to modify the content of the book, and if you want to fix the aspect ratio you *should* be editing it manually (or using Polish Book, or the Editor tool "Add cover").

Personally, I just use Polish Book, which inserts a newly-generated coverpage as well. It is easy to do in bulk to your entire library.

Revision history for this message
Kovid Goyal (kovid) wrote :

Yeah metadata update updates cover images, it does not and will not touch HTML markup. And metadata update does not size limit covers.

Revision history for this message
Jeff Rife (g-uduntu-5) wrote :

Because of this, the cover size limiting setting has no actual effect.

1. Set a size limit.
2. Set the cover.
3. Polish book, convert format, etc., to get the cover in the file at no more than the maximum size.
4. Send to device and have the cover replaced with the larger version.

There is no setting to stop the metadata update on send to device, but even if there were, it would be a pain to set it and have to make sure metadata is manually updated, then the correct cover set via polish book, then send to device.

It also means that if you forget to "polish book" every time you make a change to the cover that affects the geometry, the book ends up with an HTML/cover mismatch.

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1618970

I have no idea what you are talking about. The cover size limit setting
is in Preferences->Tweaks and has one purpose and one purpose only, to
limit the max size of cover images in the calibre library. Which it
works for perfectly.

Revision history for this message
Jeff Rife (g-uduntu-5) wrote :

Sorry...I was thinking of wrong tweak (there are a bunch, you know).

I was thinking of the feature that resizes images to the output device on conversion or "polish book". I guess it's controlled by the device chosen in the "Output profile".

It's that feature that gets broken by the automatic replacement of the cover in the book with the cover in the database whenever metadata is updated.

Revision history for this message
Kovid Goyal (kovid) wrote :

Polish book has no such feature. It is present in conversion -- but it
is meant for all images in the book, not particularly the cover and will
likely go away in the future, since there is no need to resize images at
all with modern readers.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.