Wednesday, September 3, 2014

Kindle Kids' Book Creator - An Analysis

Amazon today released something of a companion to their Kindle Comic Creator application that, like its predecessor, allows for relatively easy graphic layout of Kindle illustrated ebooks, this time geared toward producing children's content rather than comics. Like Kindle Comic Creator (KCC), the new Kindle Kids' Book Creator (or KBC for short) presents a very stripped down interface with a rather limited array of tools. However, this is somewhat deceptive, since users also have access (in both programs) to direct HTML/CSS editing within the application, which makes it useful both for those with some coding skills and those who only want a basic drag-and-drop style interface. For those without, however, the options for styling are somewhat slim, though they should suffice for most cases.

A companion User's Guide is available from the KKBC home page, which details in the usual sketchy technical outlines how to use the program, so I won't go through that here, but suffice it to say that the user guide isn't really necessary, since there's very little that you'll need to learn to use this thing, and most of it is fairly self-explanatory from a cursory glance at the menu bars and buttons; a half dozen random clicks will teach you all you need to know in fifteen minutes.

I ran a quick and dirty test to see how the program fared, and for the most part I was pleasantly surprised, although not without a healthy handful of caveats. Foremost of these right from the get-go is the lack of support for epub as an input source: KBC only accepts PDFs and image files, which means that if you have a nice layout to export from InDesign your only option is to make a PDF and start over from there. You can import pages with text embedded and create text pop-ups to cover them up, or import image-only pages and create both the base text and magnified text from scratch, and then move it around and size it all to fit. If you cut and paste text from another document any styles applied in the original will not transfer, since the underlying CSS will not be copied as well, but any tags you've added to the code still will be in the HTML, so you can manually add the CSS rules to the KBC file easily enough. This, of course, implies the need to delve into the underlying code, which somewhat defeats the point of using a program such as this. But that's the last we'll see of that necessity if you actually want to add some style to your work.

Unfortunately, even though you can add text as a separate layer in KBC, the "childrens" book-type that is automatically added to the output OPF renders the text inactive in the Kindle readers, so that dictionaries, highlights and word search will not work, rendering it essentially the same as text embedded in the image. This is why I discourage the use of a book-type value in fixed layout files as a general rule, but that's a choice each content creator must make for themselves. You can, however, delete the book-type entry from the OPF manually and all the text will then be active. Why Amazon has crippled this ability in children's books and comics is beyond me.

If you create the base text from scratch KBC will automatically add it to the pop-up at 150% magnification (if you add a pop-up, that is, since you don't have to), but you can "unlink" the pop-up from the base text and add any other content to the magnified region that you want. It will still be magnified at 150% of the base text, however, so if you simply want to have the base text change you'll have to learn to do some custom coding in the HTML/CSS editors to make it work (for example, if you want to produce a bi-lingual ebook, or use the pop-up like a question/answer flashcard). Unfortunately, KBC's behind-the-scenes code is a little balky, so unless you already know your way around a KF8 fixed layout file archive pretty well you'll be looking at a lot of gibberish, and even for those of us who do it's pretty messy in there. Also, to create clever tricks like using mag regions to replace one image with another isn't something that can easily by done in KBC. If you're wanting to add that kind of interactivity into your project, KBC is not the tool for you.

Other detracting factors against using KBC for anything but very simple projects are its lack of an Undo button (!), so you better be sure you want to make a change before you do, because there's no way to get it back once it is gone. You can "re-link" a base text box to a pop-up, but this deletes any other custom changes that you've made to the pop-up, replacing them with the default text, and that change cannot be undone, so whatever you had created will be lost. This is a horrendous oversight on the programmers' part, and truly unforgivable in this day and age.

Even though you import images of a given size (that you have no doubt chosen for a reason), KBC will automatically re-size them to a seemingly random dimension of its own choosing, over which you have no control. In my sample test file, for example, all my images were 1118 by 1788 in size. This was chosen as the largest size for which I could achieve the highest quality setting in Photoshop and still come in at just under the "standard resolution" image file size limits the Kindle has in place for older devices (which KBC apparently does not support - only the Fire devices are listed as supported, and available for previewing). At any rate, KBC arbitrarily assigned a landscape layout page size of 1920 wide by 1535 high for my test project, making each half page image only 959 by 1535 rather than 1118 by 1788. Curiously, however, the auto-generated "scaled-images" folder contained both the original, unchanged images, as well as "thumbnail" versions scaled to 625x1000 pixels and compressed to down around 100 kb in size, rendering them utterly atrocious in quality. Which ones the reader will see is anyone's guess, but since KBC files are apparently not compatible with the eInk devices (even though those devices do support fixed layout KF8 files) my guess is that the larger ones will be delivered to the Fire devices and the smaller ones to Android and iOS apps for phones. But I'm only guessing there, so don't quote me.

You can add single pages in portrait or landscape orientation, or two-page spreads in landscape using either two image stitched together or one image spanned across both pages. This is very nice feature made very easy during the image import stage. However, auto-orientation is unfortunately not an option here; you must choose one or the other. I should also mention that you can add or create additional pages at any point in the process, and insert them anywhere in the page sequence, and even re-sequence pages already added simply by dragging them to a new location. You can also delete pages, but once you do they are gone for good along with any content you included in them, and again this cannot be undone.

You cannot open mobi files that were not created using KBC, even if they're KF8 format children's book-type files. So KBC can import a PDF but not it's own native KF8 format. Go figure.

Above is a snapshot of the formatting toolbar available in KBC, and as you can see the options are somewhat limited. The "Add Pop-Up" button creates a mag region with no underlying text, while the "Add Text option creates both at one go. Just add your text to the base layer text box and it is automagically magnified at 150% in the pop-up box, both of which can be moved around and re-sized to your liking. You can embed custom fonts easily enough using an Add Font menu option, with any added fonts appearing in the drop down menu here. You can also change their size and color very easily here, which is a plus. There is also the slightly unexpected line height and character spacing options to help you make your text fill up the page just right, but be aware that these apply to all text in a single given text box and no others, so if you want all the text throughout the book to look the same you'll once again need to dive into the code and create a custom CSS rule for your base text. It's also not possible, of course, to only change the character spacing for just one line without embedding that line in a separate text box, thereby breaking any pop-up windows into pieces also.

Other than that you have the basic bold, italic, underline, and four standard text alignment options to choose from, and nothing else. There is no way to wrap text around images as in iBooks Author, or even to automatically align text boxes to a standard margin without resorting to advanced CSS editing. Text boxes can be moved and re-sized easily enough by dragging on their corners or edges, but there is no ruler or grid system by which to align them. Also, unless I'm blind I'm finding no color picker to alter the background color in the magnified text boxes, so again you'll need to learn some CSS to use this tool that Amazon is hyping in their promos as being designed for those who don't know any HTML or CSS, and theoretically don't need to learn. In other words, KBC is fairly dismal as a graphic design tool, and if you're used to using Adobe products or iBA for your layout work you'll feel as if you've been drugged and had your arms chopped off while trying to produce something genuinely inventive here.

There is a Console panel available that shows the log file which Kindlegen produces during conversion, but if you're advanced enough to understand that you don't need to be using this kid's toy. Honestly, I was hoping for an adult app at some point from Amazon that can create advanced layouts and complex motion graphics, but all they've given us so far are simple widgets only good for making very basic layouts. And that's probably good enough for beginners, but it's not something professional ebook formatters will ever use.

So to summarize:

  • Easy user interface for a quick and simple learning curve
  • Easily create magnified text pop-ups from base text
  • Text layers isolated from background art (for potential live text upgrades)
  • Editable CSS/HTML code from within the program
  • Two-page spreads with facing pages made super simple
  • PDF / image input for really simple import most users can manage
  • Generates the necessary file structure, including OPF & NCX, which can be edited externally

  • No epub or mobi file input
  • Cannot edit mobi files not originally created with KBC
  • Very limited layout and formatting tools
  • Only basic text interactivity (pop-ups) without advanced HTML/CSS coding skills
  • No support for eInk devices (exports only to "Fire-compatible" KF8 according to the guide)
  • Auto-Orientation not available (locked to landscape or portrait)
  • Auto-resizes images without your input (cannot select your own "original-resolution" value)
  • No Undo!
  • Previews only available for Kindle Fire devices currently
  • Did I say No Undo?

A few notes for the more advanced users:

There are a couple of new "ke-" prefixed entries in the metadata section of the OPF that are interesting:
<meta content="doublepagespread" name="ke-layout-type"/>
<meta content="start-right" name="ke-start-side"/>
<meta content="true" name="ke-hd-images"/>
The first is what allows two pages to be knit together into one page spread or a single image to be spanned across two pages, but I haven't had the chance to dive into the generated CSS to see what's being done just yet to know what all the options are, or why this is necessary when the KF8 code already has the ability to create facing pages from two images. In this case it's a two-page spread consisting of two individual images, so "doublepagespread" is the value. The value is for a two-page spread made from a single image is, not surprisingly, "singlepage".

Second up we have the "start-side" which for the first time allows a Kindle fixed layout file to have a single standing first page on the right side (or presumably left in rl-horizontal writing mode ebooks). Previously this was attempted with the page-id "layout-blank" value, which never worked correctly, and single pages always appeared centered in the viewport rather than to one side or the other.

Finally, we have an "hd-images" entity that I presume is part of the new "standard resolution" versus "high resolution" image distribution for old model versus HD devices. Here the value "true" tells me that only the HD images are going to be transferred to whatever device the file is destined for, regardless of the model. Or perhaps it means that only HD devices are supported for this file, as implied by the absence of any mention of eInk screens in the documentation. But if "false" is also a legitimate value for this entity it begs the question of just what the heck is going on here. Of course, each of these is generated automatically by KBC, so you really aren't intended to alter them outside of the settings found in the program menus, and there isn't one for this third entry. But here they are for what it's worth.

Incidentally, KBC only produces a toc.ncx rather than a nav doc with landmarks, and the OPF contains none of the EPUB3 additions that had previously been implemented in KF8.

Well, that's all I've got for now after a quick first look. I'll ponder on it more and maybe play with it a bit tomorrow. But I doubt I'll ever use it much, except for previewing my HTML/CSS code on the fly. And honestly, that's the best use I can see right now for this thing.

Wednesday, May 28, 2014

"How To Make Kindle Comics" Update 2.0

A newly revised and updated "2.0" edition of "How To Make Kindle Comics & Children's Books" has just been published, with additional content and revisions to include the recent changes made by Amazon to the allowed image file size limits in Kindle fixed layout ebooks for HD devices, as well as other details uncovered during file testing since the first edition was released.

I have also taken the opportunity to make some editorial changes, textual polishing, and adjustments to the relevant charts and sections affected by these recent changes. Much of this has been documented on this blog, but it is now all housed together in the published guide.

In addition, an ePub edition is now included in the downloaded zip archive for no extra charge when purchased through my website (along with an updated PDF). The ePub and PDF are not available if bought through Amazon! However, the Kindle edition sold there has also been updated, so you should see an "update available" button for this title in the "Manage Your Content" page at Amazon (to the right of the title).

When you click this button you'll receive the following info message box:

If you've made any notes or highlights in the book, these will be lost, since the content on the pages doesn't actually match up with the previous version anymore. In addition to a substantial number of revisions, additions, and alterations, the book is now two pages longer. This is why Amazon don't automatically push updated versions of a title to your device.

For those of you who have already purchased the book directly from my site, you can download the updated files via the link you received when purchased. If you no longer have that link, drop a line via the Contact page and I'll resend it. Be sure to include your full name and the email address you used when you bought the book.

The sample pdf download has also been updated, so for those who have not yet acquired a copy, you can click the "Read Sample" button on the product page (or just click that link) to read a 40+ page excerpt of the book.

Sunday, May 25, 2014

Kindlegen "-dont_append_source" Option

I discovered this week that there is a command line option for Kindlegen that keeps the source file zip from being added to the compiled mobi archive. It was hidden in the Kindle Publishing Guidelines under the "Building Dictionaries" section (7.5), appearing first in Version 2014.1 back in January, and was not specifically listed in the Revision History, where it simply said "Dictionary Overview (and all subsections of same)." I went through that section, noting all the changes but this one. Go figure.

At any rate, if you add this option to your kindlegen command it will bypass the addition of the source file archive to your output file:
Kindlegen will output this message as the first line in the conversion log:
Info:I9018:option: -donotaddsource: Source files will not be added
I tested a fixed layout file to be sure it worked, and what I found was that a 19.6 Mb source epub which normally converts to a 44.9 Mb file, resulted in a 25.2 Mb mobi when appending this conversion option. Extracting the contents using KindleUnpack showed that the source zip file was indeed absent.

So for those who have been using KindleStrip to remove the bulky source files from your files, you can now just add this option during conversion instead. KindleStrip is no longer necessary.

Bear in mind, however, that with the larger image file size allowance, if you're including higher resolution images for HD devices that are over the standard definition limits (i.e. 127/256/800 kb), these source files may be required by Amazon in order to send them to the end user's HD device.

UPDATE: 5-27-14

In fact, the archive is not required in order for the HD images to be delivered, as these are stored in a new HD Container section of the converted mobi file. So you can safely remove the zip archive (or keep it from being added in the first place) when distributing the files outside of Amazon. Of course, there's no real reason to remove them if uploading to KDP, unless your converted file exceeds 50 Mb in size.

Saturday, May 24, 2014

Kindle Image Size Test Results

I ran some further tests this morning to determine the effects of various image file sizes in different Kindle formats, on different Kindle devices. I did this in order to determine where the cutoff was for acceptable response, since the first test I did last week resulted in very sluggish behavior on the HD 8.9 device, which is the only one I tested then. I had also only tested a fixed layout file with the comic book-type on the actual device, so I did not know if these results applied to children's books or reflowable files as well.

For this test I created a jpeg image using a color gradient and pattern overlay in Photoshop to produce a range of sharp and soft edges across the spectrum, as well as an area of sharp black and white lines. Initially I made a file that was 4800 x 3000 pixels in size, since this is the largest image size recommended by Amazon in the Kindle Publishing Guidelines, in Section 5.2, where it deals with Zoom Factors.

However, I could not create a file at this size with this much color information at 100% quality that was under the 5Mb image limit. In fact, the file came in at 7.97 Mb, and even though it exceeds the limit by nearly 3 Mb, Kindlegen accepted it and did not abort. The resulting quality, of course, was horrible, even on the HD 8.9, and the image was clearly compressed to fit the limit. Moreover, after extracting the contents of the file, I discovered that Kindlegen will, in fact, actually reduce the dimensions of an image this size, even in a file with the comic book-type, contrary to my previous beliefs (though, of course, I had never tested an image file anywhere near this big, since it was not previously allowed). Therefore, apparently Kindlegen will no longer abort during conversion due to image file size, even when the image is bigger than the new limit.

I next created a new jpeg image file that was 3800 x 2376 in size and came it right at 5Mb with no compression applied (that is, a 100% quality factor in Photoshop). Images at this resolution did not have their dimensions altered by Kindlegen. From this image I then created a series of versions, each with successively more compression applied, right down to 10% "low" quality. These were the file size results:

100% - 5 Mb
95% - 4.30 Mb
90% - 3.8 Mb
80% - 2.9 Mb "Very High Quality"
70% - 2.4 Mb
60% - 2.06 Mb "High Quality"
50% - 1.39 Mb
30% - 1.04 Mb "Medium Quality"
10% - 807 Kb "Low Quality"

With these I produced a 10-page ebook (including a cover image using the 100% file, since this image is compressed differently than internal image files), with each page containing an image of greater compression than the one preceding it. I then created both a fixed layout "comic" and "childrens" book, as well as a reflowable file from this source archive. Total file sizes were 46.1 Mb, 44.7 Mb, and 40.3 Mb respectively. I tested each of these on the HD 8.9, HD 7, and the Kindle Fire 2. I did not bother with the eInk screens, whose image clarity is poor at best.

I should note here that Photoshop handled the compression of this image rather admirably, with "reasonably" acceptable results right down through the lower range, with minor amounts of blurring occurring from around 80%, and visible artifacting beginning at 60%, becoming plainly obvious at 30%, but never gravely intolerable (and I'm talking about a fairly small amount overall, visible only with close scrutiny). The quality of the images on the HD devices was, therefore, equally decent, with no overly glaring errors or corruption, even at the lowest level of 10%. But overall the images were vivid and pristine on the HD displays throughout upper quality levels, and quite good across the whole range. They would, of course, be even better with images of smaller dimensions, but I wanted to test the extreme limits of file size.

Ironically, on the standard resolution Fire these aberrations were less noticeable, due to an overall blurry appearance of the images at all levels, since on these devices the Kindlegen-compressed images are displayed rather than the full size hi-rez images, and thus they are all highly compressed (i.e. they all sucked more or less equally). The reflowable file was, of course, much less tolerable than the other two, with all images suffering from severe fuzziness and lack of crisp details. This is due to the fact that Kindlegen was forced to reduce the image dimensions down to around 575 x 920 (from 3800 x 2376) in order to achieve the 127 kb limit for reflowable files, requiring even the "low resolution" Fire screens to add back in additional pixel information that had been removed during conversion! Conversely, on the HD displays the reflowable file images were crisp and pristine, proving that the original resolution images were being displayed.

But this is nothing the average reader would likely even notice, aside from a general sense of mediocre presentation, as opposed to the sense of pristine clarity that comes across in hi-rez files on the HD screens. Without both devices sitting side by side for comparison the difference in detail would be far less obvious.

Of course, image quality was only part of what I was after here. This test was undertaken as much for the purpose of determining the effects of image file size on page load time. In my initial test last week the high resolution images I used caused the HD 8.9 to bog down to a crawl, but I did not know if this was due to the image size, dimensions, book-type, device, or combination of them all. So with the files I made today I loaded each one onto the devices mentioned above and swiped through the pages methodically, counting the seconds it took for each page to load, and then repeating it at least three times each, for each book-type on each device. Tedious, to say the least.

Interestingly, what I found was that in every instance - with the single exception of the comic book-type on the HD 8.9 - the results were more or less the same. The chart below shows the average load time in seconds, with the exception of the HD 8.9 comics in its own column:

File Size
HD 8.9 Comics
All Other
100% - 5Mb
95% - 4.3 Mb
90% - 3.8 Mb
80% - 2.9 Mb
70% - 2.4 Mb
60% - 2.06 Mb
50% - 1.39 Mb
30% - 1.04 Mb
10% - 807 Kb

As you can see, the load time more than doubles for the HD 8.9 device with the comic book-type, ranging from 3-5 seconds rather than the 1-2 second load time of all other instances. Moreover, response was buggy and caused the book to close unintentionally on numerous occasions. This is possibly due to the additional system feature of Virtual Panels that has to load with each page in comics, although this also occurs on the HD7 and Fire, just not at that resolution. But it is certainly not due to the image size itself, since this does not occur on that device with children's books or reflowable files that include the exact same images.

At any rate, from the chart you can see that in most cases the image load time is in the 1 second range with images of 2 Mb or less, while images from 2.4 to 3.8 Mb take slightly longer, and 4-5 Mb images requiring twice as long to load. For comics on the HD 8.9 there was a larger degree of variance throughout the tests, with more inconsistency in load times, but in general pages that contained an image larger than 2.4 Mb took on average a full 5 seconds to load - an excruciatingly long wait, during which time the device simply does nothing at all (on the HD 7, conversely, the page turns white and a circular "loading" icon appears, so that at least you know something is happening). The average dropped to an only slightly less annoying 4 seconds for 1-2 meg files, and only reached a 3 second best for the lowest quality image - one that only just exceeds the standard comic file size allowance of 800 kb!

Bear in mind, of course, that these are still also very large files in terms of image dimensions, so that regardless of the file size there is still an enormous amount of pixel data for the display to deal with. Moreover, these results will improve in time as processor speeds and onboard memory increase. But for now, as I've said on many occasions before, we have to deal with what we've got. My recommendation is to use much smaller dimensions (say, 2880 x 1800 max, which is 150% of the HD 8.9" resolution), and shoot for around 1.5 to 2 Mb for your largest image file size (and smaller if you can get away with it without compromising quality, bearing in mind overall file size and the subsequent delivery fees). And this all obviously only applies to images with a high degree of pixel information in them, such as complex maps and highly detailed artwork. Use your best judgement, of course, but be aware that a much higher degree of image quality is now possible on the Kindle than it ever has been before. Take advantage of it if you can. I, for one, look forward to seeing some truly beautiful artwork radiating from my HD Kindle screens.