Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 05-12-2022, 01:11 PM   #1
innocenat
Member
innocenat began at the beginning.
 
Posts: 16
Karma: 12
Join Date: Feb 2022
Device: Kindle PPW3, PPW5
KFX format detail for Comic/Manga

Are there any information out there on KFX/KPF format other than what is on MobileRead wiki?

I tried to read KFX Output plugin source code but it get confusing really quickly when I get to the ION thingy.

What I wanted to do is to automate conversion of AZW3 manga to KFX manga. I figured with fixed layout book the KPF/KFX file is not going to be too complicated to be created by outside tools. Right now I have automate pretty much everything except having to open Kindle Create to import images and set table of content manually.

Also I am trying to figure out if it is possible to modify KPF/KFX to tag some pages as double-page spread. There doesn't seem to be this option in Kindle Create, and I don't have access to KFX file with this feature enabled.

If anyone could point me in the right direction I would be grateful.
innocenat is offline   Reply With Quote
Old 05-12-2022, 07:02 PM   #2
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 5,283
Karma: 54432249
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by innocenat View Post
Are there any information out there on KFX/KPF format other than what is on MobileRead wiki?
There is no good documentation that I am aware of.

There as bits and pieces of information scattered throughout various threads here on MobileRead, including this one: KFX Format

Amazon has documented Ion which is the underlying data storage format for KFX. See https://amzn.github.io/ion-docs/

Quote:
Originally Posted by innocenat View Post
I tried to read KFX Output plugin source code but it get confusing really quickly when I get to the ION thingy.
I wrote that for my own use and was asked to make it into a calibre plugin. It lack comments and isn't a great learning tool.

Quote:
Originally Posted by innocenat View Post
What I wanted to do is to automate conversion of AZW3 manga to KFX manga. I figured with fixed layout book the KPF/KFX file is not going to be too complicated to be created by outside tools. Right now I have automate pretty much everything except having to open Kindle Create to import images and set table of content manually.

Also I am trying to figure out if it is possible to modify KPF/KFX to tag some pages as double-page spread. There doesn't seem to be this option in Kindle Create, and I don't have access to KFX file with this feature enabled.
The online documentation for Kindle Create has some information on this. Prepare Comic eBooks with Kindle Create (See the section on Facing Pages and Single Pages.)

Basically if you set two pages as being "facing pages" they will be shown together when viewed in landscape mode. If you need them to always be shown together you have to combine the images into a single page before importing into Kindle Create.

Trying to modify the KPF to reflect that after the fact would be difficult to do correctly.
jhowell is online now   Reply With Quote
Old 05-12-2022, 11:28 PM   #3
innocenat
Member
innocenat began at the beginning.
 
Posts: 16
Karma: 12
Join Date: Feb 2022
Device: Kindle PPW3, PPW5
Quote:
Originally Posted by jhowell View Post
There is no good documentation that I am aware of.

There as bits and pieces of information scattered throughout various threads here on MobileRead, including this one: KFX Format

Amazon has documented Ion which is the underlying data storage format for KFX. See https://amzn.github.io/ion-docs/
Thank you!

Quote:
Originally Posted by jhowell View Post
The online documentation for Kindle Create has some information on this. Prepare Comic eBooks with Kindle Create (See the section on Facing Pages and Single Pages.)

Basically if you set two pages as being "facing pages" they will be shown together when viewed in landscape mode. If you need them to always be shown together you have to combine the images into a single page before importing into Kindle Create.

Trying to modify the KPF to reflect that after the fact would be difficult to do correctly.
That's actually not it.

In manga, there are "double-spread" as in the it's a single, big image splitted in left and right page. In properly formatted KFX book (directly from Amazon), when view in portrait mode, the first page is shown with small preview of double-spread. Going to next page will go the second page of the spread, but tapping the double-spread preview will display both page in landscape mode. It's a very nice feature, but as far as I know there's no corresponding setting in Kindle Create (actually Kindle Create doesn't even support setting language to Japanese yet).
innocenat is offline   Reply With Quote
Old 05-13-2022, 04:48 PM   #4
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 5,283
Karma: 54432249
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by innocenat View Post
That's actually not it.

In manga, there are "double-spread" as in the it's a single, big image splitted in left and right page. In properly formatted KFX book (directly from Amazon), when view in portrait mode, the first page is shown with small preview of double-spread. Going to next page will go the second page of the spread, but tapping the double-spread preview will display both page in landscape mode. It's a very nice feature, but as far as I know there's no corresponding setting in Kindle Create (actually Kindle Create doesn't even support setting language to Japanese yet).
"Facing pages" is what Kindle Create calls double page spreads.

Turning on the "Preview Double Page Spread" option in the Aa menu enables extra handling by the Kindle. If two pages are set as facing and the content on right side of the left page closely matches the left side of the right page then a thumbnail appears at the bottom to show them both together. This is logic internal to the Kindle. There is no extra metadata involved other than the pages being set as facing.
jhowell is online now   Reply With Quote
Old 05-13-2022, 11:18 PM   #5
innocenat
Member
innocenat began at the beginning.
 
Posts: 16
Karma: 12
Join Date: Feb 2022
Device: Kindle PPW3, PPW5
Quote:
Originally Posted by jhowell View Post
"Facing pages" is what Kindle Create calls double page spreads.

Turning on the "Preview Double Page Spread" option in the Aa menu enables extra handling by the Kindle. If two pages are set as facing and the content on right side of the left page closely matches the left side of the right page then a thumbnail appears at the bottom to show them both together. This is logic internal to the Kindle. There is no extra metadata involved other than the pages being set as facing.
Oh. I swear I must have tried that a dozens time with no result, but I just tried again and it worked. Sorry.

And apparently it's not even if the page is closely match. It seems if there's enough non-white pixel on either of the page edge, it will be shown as double spread.
innocenat is offline   Reply With Quote
Old 06-09-2022, 03:36 PM   #6
innocenat
Member
innocenat began at the beginning.
 
Posts: 16
Karma: 12
Join Date: Feb 2022
Device: Kindle PPW3, PPW5
Just want to note my progress in case someone stumbled upon this thread from google.

Using kfxlib from jhowell (can be found in KFX Output Plugin code), the YJ_Book class can be created easily with kpf input file. After decode_book() the ION can be accessed via book.fragments. To get the sense of what fragment is what the code in yj_*.py help a lot.

In the end I gave up. I first tried to just add new TOC item to the KPF book, but there seems to be multiple places where this need to be added. Futhermore, after a few hour playing with the structure, I still cannot figure which ION hold the "spine" of the book.
innocenat is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some problems with manga/comic agugu KOReader 2 11-25-2021 07:59 AM
Odyssey Best way to read a comic/manga? Canapin Bookeen 10 01-02-2013 05:39 AM
Comic/Manga on eInk micro Netronix 4 06-24-2007 09:25 AM
Manga comic surfing on the go Alexander Turcic Lounge 2 08-22-2005 07:31 PM


All times are GMT -4. The time now is 07:45 AM.


MobileRead.com is a privately owned, operated and funded community.