Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Book cover extracting enhancements #49

Merged
merged 1 commit into from
Jun 26, 2022
Merged

Book cover extracting enhancements #49

merged 1 commit into from
Jun 26, 2022

Conversation

vers-one
Copy link
Owner

Book cover extracting enhancements

This is:

  • a bug fix
  • an enhancement

Related issue: #48

Description

  1. All prior BookCoverReader hacks and heuristics have been removed.
  2. The new implementation will try to extract the EPUB 2 cover using the <meta name="cover" content="..." /> element (this approach is used by most EPUB 2 books). If such element was not found, the implementation will try to find a <guide>/<reference type="cover" href="..."> element whose href attribute points to a known image.
  3. Proper support for EPUB 3 covers have been added.
  4. PackageReader will try to read all known EPUB 2 and EPUB 3 <metadata>/<meta> attributes, regardless of the actual version of the EPUB file (this was suggested in Fix PackageReader to pick up cover images as generated on Adobe Indesign #32).
  5. Code has been refactored to fix all code style warnings.

Testing steps

Try to open various EPUB 2 and EPUB 3 books in the WPF Demo app and make sure that their covers are being rendered properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant