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

Attempts to display ePUB cover image as binary #204

Open
StevanWhite opened this issue Aug 5, 2012 · 7 comments
Open

Attempts to display ePUB cover image as binary #204

StevanWhite opened this issue Aug 5, 2012 · 7 comments

Comments

@StevanWhite
Copy link

Hi,

An ePUB content.opf file will often have a

<spine>

element that contains an entry
something like

 <itemref idref="cover" linear="no" />

The 'linear' attribute is meant to indicate that the item is not to be included in the
order of reading, and is used specifically to remove a book cover image from the TOC.

The current version ignores this attribute, and attempts to render the image as binary text.
Result is bad.

@StevanWhite
Copy link
Author

Here's a fix.
Oh dear. How do I attach a diff?.... I can't see it anywhere....

OK I'll do the best I can :
In the file EPubBook.java,
in the line after

                        kid = spine.getElement(i);

insert

            String linear = kid.getAttributeValue(
                                KXmlParser.NO_NAMESPACE, "linear");
            if (linear != null 
                        && linear.toLowerCase().equals("no")) {
                            continue;
                        }

This has the desired effect.

But... it really needs to have EPUB's NCX functionality...

@dumbledore
Copy link
Owner

I'll give it a look. Could you provide the epub as well so I could test it.

Thanks!

@StevanWhite
Copy link
Author

Hi Svetlin,

I made this one. (Note it is just an experiment, based on a release
from Gutenberg press.)

It works on most other e-readers, but not with Albite.
This one has a PNG image cover, but it's easy to set the contents file
to point to
one of the other formats.

Here are more ePub things I would like improved (I could do the coding
myself if you like).

  1. ePUB support
  2. support for ePub book covers (png, jpg, and svn)

Further down, at least on Symbian, the UI has some issues that could
be improved.

  1. no way to zoom in on an image, navigate it
  2. menus are really odd on my phone.

That top bar replacement... does it work on any phones?
It doesn't work on mine...

Oh, and localization isn't working. My phone is German, but Albite is
all in English.
(This is something I've had success with in the past...)

Cheers!

On Mon, Aug 6, 2012 at 10:24 AM, Svetlin Ankov
reply@reply.github.com
wrote:

I'll give it a look. Could you provide the epub as well so I could test it.

Thanks!


Reply to this email directly or view it on GitHub:
#204 (comment)

@StevanWhite
Copy link
Author

Svetlin,
Here is a comparison I made last week, of all the e-reader software I could get my hands on. (I have since also seen Google Books).
http://www.zipcon.net/~swhite/docs/computers/E-Book_Readers.html
Albite has this one big bug (this bug report), then on Symbian some UI issues, and then the ePub TOC thing.
For complex documents on a small device, it's also crucial to be able to zoom in and navigate images. The ability to follow hyperlinks (at least within the document) makes it better than a book, for books with a lot of internal references.

Otherwise I would say Albite is the best at rendering complex text (mixed character sets, embedded images).
Your competition on Android is FBreader. The commercial ones are -- disappointing.

@dumbledore
Copy link
Owner

Thanks so much!

Stevan, I'd like to tell you that I'm going to address those issues in Albite 3. I'm happy to say that it also features a far cleaner code design. Meanwhile, you could have a look at the new book flipping interface and the new UI.

Thanks!

P.S. Thanks a lot for the analysis.

@StevanWhite
Copy link
Author

Svetlin,

To tell the truth, I only managed to build and install the Symbian version from Git.
Is this Albite 3? It says 2.2...
I tried to install it on Android, but something went wrong (I have netmite on there...).

Regarding the main issue of this bug report, in my recent experiments, I'm finding very little agreement on the standards. The ePub standard clearly allows image content on the top level (with full MIME type), but several readers misinterpret it (others do fine though). I've also looked through some books that came with my iRiver reader, and found images always wrappered in HTML. (On that device, the Google reader displays SVG cover pages, but has a bug: it always closes the book when you navigate out of a raw SVG cover -- doesn't happen if it's JPEG. As I said, you're doing well-- the competition is mostly very buggy.)

The best thing would be to allow for raw images or wrapped ones.

@dumbledore
Copy link
Owner

Is this Albite 3? It says 2.2...

I was talking about the demo videos on the provided links.

I'll think about the cover images when I get that far.

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

No branches or pull requests

2 participants