gutenbergtools / ebookmaker

The Project Gutenberg tool to generate EPUBs and other ebook formats.
GNU General Public License v3.0
84 stars 18 forks source link

PNG cover images don't work on iPad with Apple Books #234

Closed gbnewby closed 2 months ago

gbnewby commented 3 months ago

See https://www.gutenberg.org/ebooks/30728 or other books that don't include a cover page image for an example.

EBM correctly creates a random cover page in JPEG format. However, the format of the cover page within the EPUB is PNG. 8038495381949947165_30728-cover.png in this example.

We have a verified report that viewing this on a current model iPad with the Apple "Books" app (iPad Air 11-inch (M2) running iOS 17.6) does not show the cover page in the library index (image attached).

It seems that instead of PNG these books should have a JPEG cover image.

IMG_6182

eshellman commented 3 months ago

try this one: (remove the .zip extension) pg30728-images-3.epub.zip

asylumcs commented 3 months ago

I've forwarded it to the user.

eshellman commented 3 months ago

that epub tests if a the dimensions of the cover png make a difference.

asylumcs commented 3 months ago

The user reports the new epub shows the geometric-shapes cover. To be honest, my "something isn't right" alarm is going off. Her iPad shows a mix of blue-icon book covers and regular book covers. She seems to think the blue ones are quite old. Gut feel: image dimensions do not matter especially based on the recommended dimensions that are quite large. Perhaps she simply has old epubs for the ones that show the blue covers. I'm going to ask her to download a modern eBook from PG that uses the png cover image.

asylumcs commented 3 months ago

I asked her to download 74204 because I knew it would be new and not cached on her iPad. Her inconclusive description of what happens leads me to think we probably don't need to change anything. Perhaps those "blue covers" were ones that she had on an older iPad that Apple transferred to her new device. Here is her report:

When I actually downloaded the book (which I now realize is Don Quixote!), something very odd happened. I went to the downloads folder on my ipad, clicked on the file that had downloaded, and it opened with at first, fleetingly, a plain brown cover, then the pink geometric cover immediately replaced the brown cover. Then when I went to Books, and closed the “book” and reopened it, I got a flash of the brown cover which was fleetingly replaced by the pink geometric cover. Now, when I quit Books and go back in, the pink geometric cover is all I see.

I have never experienced that before. Ever.

When I say “fleetingly,” I mean it’s as fast as one snap of your fingers. VERY fast.

asylumcs commented 3 months ago

Update: thinking the ebooks she had with blue covers might just be very old, I asked her to download recent versions. Here is her report:

Sure, I will download at least one of the blue icon books again. Hang on…ok, I downloaded The Gifts of Asti, by Andre Norton. It came in with a plain gray cover, which changed to the geometric one in the downloads folder just like Don Quixote did yesterday. Then when I opened Books, it was the plain gray cover, but after I opened the book, and closed it again, it was geometric. So I quit Books and went back in. The cover of The Gifts of Asti is geometric, in Books, at the moment.

But the cover of Oneness, that I downloaded yesterday, is plain brown today. It’s no longer geometric. I will try opening it and see what happens…Interesting. I clicked on the book to open it. Inside, the cover popped up—geometric. I closed the book—brown cover. I quit out of Books and went back in. Brown cover. 

At least it’s not the blue icon!

asylumcs commented 3 months ago

She also mentioned this:

Someone on the apple support site was claiming that apple fixed it so that any books not purchased through the apple store would disappear from people’s libraries, but that’s not true. I have all the books.

Maybe something is going on with Apple. But we would have heard about this from other users, right?

asylumcs commented 3 months ago

I've asked her to send me one of the Epubs that is showing the blue cover if she can figure out how to do it. I would like to figure out what's going on.

asylumcs commented 3 months ago

Seems to me this issue can be closed without action. If the blue covers cannot be reproduced, then we have no way to know if we've fixed anything. The user agrees. She writes "Please thank everyone at PG who tried to figure out what is going on. I appreciate their willingness to try."

eshellman commented 3 months ago

Is there any downside to increasing the size to comply with the apple requirement?

gbnewby commented 3 months ago

It sounds like that would be a good idea.

On Sun, Aug 11, 2024 at 12:36 PM Eric Hellman @.***> wrote:

Is there any downside to increasing the size to comply with the apple requirement?

— Reply to this email directly, view it on GitHub https://github.com/gutenbergtools/ebookmaker/issues/234#issuecomment-2282866245, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQRDLQHZXO3CUM4KFJVXWDZQ64NHAVCNFSM6AAAAABMFM34LWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBSHA3DMMRUGU . You are receiving this because you authored the thread.Message ID: @.***>

eshellman commented 3 months ago

Given that the DP guidelines https://www.pgdp.net/wiki/DP_Official_Documentation:PP_and_PPV/Post-Processing_FAQ#Information_for_all_types_of_cover suggest 1600 wide , it seems that our generated covers should be that size.

gbnewby commented 3 months ago

Agreed!

On Mon., Aug. 12, 2024, 8:43 a.m. Eric Hellman, @.***> wrote:

Given that the DP guidelines https://www.pgdp.net/wiki/DP_Official_Documentation:PP_and_PPV/Post-Processing_FAQ#Information_for_all_types_of_cover suggest 1600 wide , it seems that our generated covers should be that size.

— Reply to this email directly, view it on GitHub https://github.com/gutenbergtools/ebookmaker/issues/234#issuecomment-2284318965, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQRDLQNK6HKSPELE6X2HKDZRDJZDAVCNFSM6AAAAABMFM34LWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBUGMYTQOJWGU . You are receiving this because you authored the thread.Message ID: @.***>

eshellman commented 3 months ago

I suspected the png width because current Apple Books guidelines specify a minimum width of 1400 pixels. The newest Apple devices have higher resolution screens, so that could be why we haven't seen this before. PNG files can upscale poorly when they have text in them; JPG files upscale with less complaints.

Generating the geometric covers at 1600x2400 instead of 1200x1800 should be painless, the filesize should not even change.