The conversion pipeline expects the input plugin to supply it a book with a cover that is not part of the spine. For formats like ODT where there is no concept of cover, the input plugin has to guess. In theory the input plugin could set the cover and remove the image from the content, but this is wrong, because when it gets its wrong (i.e. the first image is not a cover) it can result in data loss instead of simple duplication. Which is why there is a --remove-first-image which the user can do after verifying manually that the first image is indeed a cover and should be removed.
So, in short, there is no way to build a robust automated solution for the general case. In your specific case, you can have the input plugin remove the first image if it is specifically identified as the cover via the custom opf.cover metadata. This is the appraoch that the epub input plugin takes. EPUB also is in the situation where it may or may not have a well defined cover.
|