You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EPUB 2 specification doesn't contain explicit requirements on how book cover should be represented in the OPF schema file. Instead it provides only a vague recommendation to use a <guide>/<reference type="cover"> element mentioning the Chicago Manual of Style as the source of the list of applicable <reference> element types.
Most EPUB 2 books use <meta name="cover" content="..." /> element to define the cover, where the value of the content attribute points to a <manifest>/<item> element of the actual cover image. However there are some books that don't follow this pattern, hence all the hacks and heuristics currently present in the BookCoverReader:
EPUB 3 on the other hand does define an explicit requirement for cover images by requesting to specify them via <manifest>/<item properties="cover-image"> elements. EpubReader parses these <manifest>/<item> elements along with their properties attributes correctly but does not currently use this information to obtain a cover image of an EPUB 3 book.
Proposed solution
Remove all hacks from BookCoverReader.
Replace heuristics with more robust algorithms to search for cover images in EPUB 2 books.
Add EPUB 3 cover image support with a fallback to the EPUB 2 cover image extraction implementation if an EPUB 3 cover is not available (to support EPUB 3 books that provide only EPUB 2 covers).
The text was updated successfully, but these errors were encountered:
Description
EPUB 2 specification doesn't contain explicit requirements on how book cover should be represented in the OPF schema file. Instead it provides only a vague recommendation to use a
<guide>/<reference type="cover">
element mentioning the Chicago Manual of Style as the source of the list of applicable<reference>
element types.Most EPUB 2 books use
<meta name="cover" content="..." />
element to define the cover, where the value of thecontent
attribute points to a<manifest>/<item>
element of the actual cover image. However there are some books that don't follow this pattern, hence all the hacks and heuristics currently present in theBookCoverReader
:EpubReader/Source/VersOne.Epub/Readers/BookCoverReader.cs
Lines 37 to 67 in d160caf
EPUB 3 on the other hand does define an explicit requirement for cover images by requesting to specify them via
<manifest>/<item properties="cover-image">
elements. EpubReader parses these<manifest>/<item>
elements along with theirproperties
attributes correctly but does not currently use this information to obtain a cover image of an EPUB 3 book.Proposed solution
BookCoverReader
.The text was updated successfully, but these errors were encountered: