Saturday, December 13, 2014

iBooks Image Size Increased

Although they have not yet updated their iBooks Asset Guide to reflect the change, Apple has just announced an increase to the total pixel limit allowed for interior images in ebook files published through iTunes Connect, upgrading it from 3.2 to 4 million pixels.

This follows the increase in August of last year from 2 to 3.2 million pixels, and at long last brings the overall image size allowed more in line with the actual size of the device on which they are intended to be viewed.

The increase to 3.2 million from 2 million pixels was itself, of course, a long overdue attempt to address a contradiction in Apple's recommended image size as given in the iBooks Asset Guide. With a resolution of 2048 x 1536 since the 3rd generation iteration of the full-size iPad (giving it a total pixel count of 3,145,728), the long-standing limit of 2 million pixels was nowhere near enough to fill the screen with a full bleed image in portrait orientation, let alone to zoom in for greater detail, as the Asset Guide somewhat ironically recommends:
Apple recommends providing images that are at least 1.5 times the intended viewing size up to a maximum of 3.2 million pixels.
A quick bit of math will show that 1.5 times the standard iPad display resolution is 4,718,592 pixels. So while the new 4 million pixel limit does not provide for quite that much leeway, it gets us very nearly there, and at least allows for full bleed images that can be zoomed to some degree without completely losing fidelity. The official announcement for the newest update reads as follows:
Increased Pixel Limit for Book Images
The pixel limit for all images within a book has been increased to 4 million pixels. This limit does not apply to images delivered separately from the book, such as cover art or screenshots.
Amazon, of course, has also recently increased the allowed image size in Kindle ebooks (see post here), although they use an overall image file size in megabytes rather than a pixel dimension limit. This allows for a much higher image resolution to fill the bigger 2560 x 1600 HDX 8.9 device, which boasts over 4 million pixels, before zooming (4,096,000 to be precise). By comparison, that would require an image containing 6,144,000 pixels in order to zoom to 1.5 times without interpolation! This is why the individual image limit in Kindle files has been increased to 5 MB. Converted mobi files for upload to KDP, however, are limited to an overall file size of 650 MB, which puts something of a practical limitation on the included image files (130 5Mb files to be precise, which is admittedly more than ample for most projects).

Conversely, by employing a pixel limit, Apple are restricting the total image dimensions, but not the image quality itself, which can be embedded with no compression whatsoever, if so desired, up to a total ebook file size limit of 2 GB (which is a limit imposed by the zip format itself). So while the new 4 million pixel limit does not quite allow for full 1.5 times zooming with pixel-perfect accuracy, it does come very close, and the absence of a file size limit for individual images allows for the highest quality setting possible, which might be of great benefit for art books and photography collections (in case you want to see those brush strokes on the Mona Lisa, for example).

UPDATE: By the way, for those wanting to know, 2309 x 1732 would be the largest dimension image you can now insert into an iBooks file at the standard 4:3 aspect ratio of the iPad display. That gives you an image containing 3,999,188 pixels. Just one pixel bigger at 2310 x 1733 puts you over at 4,003,230 pixels. A nice round numbered 2300 x 1725 gives you an image with 3,967,500 pixels.

Thursday, November 13, 2014

BISG Field Guide to Fixed Layout Update Errors

The Book Industry Study Group (BISG) this week released a revised edition of their Field Guide to Fixed Layout for Ebooks (Version 1.2), but it is still fraught with errors not fixed from the last edition, as well as adding new confusion via poor editing and worse research. You can download it for free from the link above (once you register for an account), which is worth doing, as it does contain some useful information in among the rest; you just have to know which is which.

A new section has been added, for example, called "Authoring Tools & Limitations" which, since Tools is plural, would presumably purport to outline a number of the primary applications currently in use for the production of fixed layout ebooks, such as iBooks Author, Jutoh, CircularFlo, MadeFire, or at the very least the two free programs offered by Amazon, Kindle Comic Creator and the Kindle Kids Book Creator. But in fact, the only tool actually discussed is InDesign CC's ePub export feature. No other program is discussed, or even mentioned. That said, the extensive list of InDesign's limitations is well worth a read, since it details exactly the reasons why I do not use InDesign for ebook production, nor recommend it, at least for the creation of Kindle fixed layout source files.

And on the topic of KF8, the following are just the primary errors to be found in the section on the Kindle fixed layout format...

1.) In the information regarding the Orientation Lock options (page 26, item #3), it states that none is a valid option, along with portrait and landscape, but then later contradicts this with a paragraph stating (incorrectly) that "you cannot have a book that can be viewed in both portrait and landscape modes," which of course, is exactly what the none value is for. Moreover, the statement that "Orientation is a required value" is only partly correct, since it is optional in comics, and only required for children's ebooks, but in either case can be set to none (which is, in fact, the default value). Granted, auto-orientation does not function on many Kindle devices, but it does on some, and it is the none value that allows for this.

2.) Item #4 states incorrectly that the values of the "Book Type" entity "can only be set to children or comic." Since this entity is optional, it can also be left out (or set to none), in either case of which the effects of the fixed layout functions vary greatly from those of either of the other two book-types. See my Fixed Layout Functionality Chart for specific details on this, if you have not already. There is good reason not to include either book-type.

3.) The last sentence on the bottom of page 26 cuts off mid-steam at the top of the following page, but seems to suggest that two-page spreads are possible only with the comic book-type. This is incorrect, since it works on some devices and not on others for both children's and comics, as well as those containing no book-type value (or a value of none), as can be seen in item #2 in the Fixed Layout Functionality Chart referenced above. However, the comic book-type does support two-page spreads more widely than either of the other two options, though not consistently. While I am sure it is beyond the scope of the Field Guide to provide these specifics, such universal statements as those given tend to be misleading, and are therefore less than helpful.

4.) The Region Magnification entity is irrelevant, since the value is set automatically by Kindlegen based on the presence or absence of region mag code in the converted file itself. The value will be set to the correct value regardless of what the content creator enters in the OPF - even, in fact, if no value or entity is added to the metadata at all. Therefore, there is little point in adding it manually, one way or the other.

5.) The statement that "KF8 fixed-layout format lacks pan and zoom" is incorrect. No, you cannot pinch and zoom pop-up regions, but you can pinch and zoom background images inserted using the <img src= > embedding method after double tapping the image (while those referenced via CSS div id's are locked). This is shown by Amazon's own Comics Sample file, which uses the unlocked insertion method almost exclusively. Moreover, pinch and zoom is a fundamental feature of the Virtual Panels function for KF8 comics that don't include any custom magnification regions: the pinch and zoom is automatically applied by Kindlegen without any active effort on the content creator's part. Refer to Item #4, Notes 6 & 7, on the Fixed Layout Functionality Chart for specific details on this.

This is just a sample of the errors and misleading information found in BISG's Field Guide. For this publication to be truly useful each of the sections and sub-sections provided needs to be greatly expanded, with detailed discussions of each specific topic, and the particular details pertaining to each platform and format, particularly if they actually expect readers to donate up to $50, as prompted by the "Pay What You Want" radio buttons on the download page. I'm not sure who in the publishing world would feel satisfied paying that much for so little rudimentary information when much more detailed data is available on blogs such as this for free. But it's your money, you can spend it as you like. I recommend the free option.

Wednesday, October 29, 2014

Kindle Publishing Guidelines 2014.2

Amazon has recently issued a revised edition of the Kindle Publishing Guidelines, bringing it to Version 2014.2. Although the changes are few, some are fairly significant, so I thought I'd post a quick rundown here.

According to the Revision Notes, there are five updated sections, plus one new addition:

I'll point out the changes to each section one by one.

• Updated 3.1.1 Text Guideline #1: Body Text Must Use Defaults

The first bullet point given heretofore in this this section has been removed:
• Body text must not have a forced alignment (such as left aligned or justified).
This section applies to reflowable ebooks, and the removal of this line presumably implies that forced alignments are now allowed, otherwise the prohibition would not have been removed. Forced alignments have actually been accepted previously, regardless of the restriction, but the rule has only now been officially expunged.

(Update: Aaron Shepherd points out that on page 69, in Section 9 on Kindle Best Practices, item #3 still states that text alignment should not be forced. But this is more than likely yet another instance of Amazon's inconsistent editorial revisions. Note that Section 3.1.6 gives specific instructions on how to force a left alignment for text!)

• Updated 3.2.2 Cover Image Guideline #2: Internal Content Cover Image Is Mandatory

Two sections of the previously existing code have been underlined, with the addition of the parenthetic statement that the
 (underlined elements are mandatory)
These two elements are contained in the OPF cover references, the first being the more recently added EPUB3 "properties" attribute for the cover image entry in the manifest (the new underlined elements have been highlighted below for the sake of clarity, although of course they're not in the Guidelines):
<item id="cimage" media-type="image/jpeg" href="other_cover.jpg" properties="cover-image"/>
The second is the standard Kindle metadata entry that's been used as long as mobi files have been in existence (so far as I recall, at any rate):
<meta name="cover" content="my-cover-image" />
This latter method has always been required in Kindle ebooks, while the former has been optional until now, since its additional a year or so ago. Note, however, that it is now a required element of the manifest entry for the cover image, if the EPUB3 cover reference method is employed. You only need enter one or the other, not both.

• Updated 3.2.3 Cover Image Guideline #3: Internal Cover Must Not Appear Twice

In the immediately following section a huge chunk of text has been removed, all of which provided for the one previously allowed exception in which an HTML cover might be included in a Kindle ebook along with the required cover image itself, as referenced above.

This removed section of text provided for a spine entry for the cover "page" using the mandatory linear="no" attribute (which has never worked correctly), and the epub:type="cover" Landmarks element or type="cover" Guide item attribute. All of this has now been rescinded, and the only remaining content in this section is explicit statement not to add a cover image in any other way than by simply referencing the cover image itself directly in the OPF.

For those of you who have read this blog awhile, or have studied my tutorials or formatting guidebook on the subject, you will know that I have long advocated against adding an HTML cover image, for the very reason that Amazon themselves have stated in this section of the Guidelines, which is that it causes the cover image to appear twice in the reader (and not might as the Guidelines state, but always, in every case on every Kindle device and app).

• Updated 3.6.1 Image Guideline #1: Use Supported Input Formats

A single line has been added to this section, which is clear enough:
Use RGB as the color profile when saving your files. Kindle does not support CMYK or sRGB.
Obviously the KDP ingestion system has been having issues lately with images employing incompatible color modes. This provides the necessary clarification to correct the issue, so take heed. Do not attempt to use a CMYK print source PDF for your ebook upload!

• Updated 3.6.2 Image Guideline #2: KindleGen Performs Automatic Image Conversions

In this section a single word has been changed, which makes a world of difference:
The maximum size of an epub is 650 MB.
has been changed to:
The maximum size of a mobi is 650 MB.
Uh, yeah, that would make a big difference. This means that Kindlegen (and by extension KDP) can input epub source files larger than 650 MB (as I have already pointed out as functionally possible, both here and in the latest edition of my book), but that the resulting mobi file cannot be larger than that size, giving an upper file size limit to publishable Kindle files. Whether or not Kindlegen will, in fact, actually produce a mobi file bigger than that is unknown, as I've never attempted to produce one. But my guess is this is more a KDP restriction than an actual production limit.

• Added 3.10.9 HTML Guideline #9: File References Must Match Case and Spelling of Source

This is an entirely new section, which again apparently addresses some errant file production practices:
Per WC3 HTML standards, all file references (fonts, images, etc.) must match the case and spelling of the name of the source file exactly.
Again, the statement is clear enough that it requires no elaboration, except to say that it's unfortunate a statement such as this even needs to be made. But I suppose that's bound to happen when non-professionals attempt to produce professional level work, without first taking the time to learn the craft.

All in all this revision to the Guidelines is mostly for the sake of such technical clarifications as this, but the few alterations made to the standard rules are each important in their own way, and can in fact be quite significant in many cases.

Saturday, October 11, 2014

Why I Don't Use eBook Creation Apps

Why I don't use ebook creation apps
(but you might want to anyway) 

 Many years ago I built my first website, using Dreamweaver. It was Version 8, I believe, back when it was still by Macromedia. The website was very basic, the program very complex. It suited my needs at the time, and had plenty of potential for expansion...if I wanted to learn how to code a complex website, that is.
I didn't.
So instead, when it came time to add a store with shopping options for buying print and ebooks to my site I switched to Yahoo SiteBuilder, since Yahoo were the top web hosting service at the time, and offered a simple add-on shopping cart package (for a fee, of course). But since Yahoo used their own proprietary code for web page layout and functionality, I had to rebuild the site from scratch, being unable to import the current site and build on that. However, after much tedious effort (not to mention learning an entirely new software interface) it resulted in a nice website that filled my current needs...for a while.
But web technology moved on and Yahoo did not. Eventually I wanted to upgrade my site to include some of the nifty new features made available by HTML5 and CSS3. But that could not be done in Yahoo.
So I moved my site to another 3rd party web platform...and built it all again from scratch, since Yahoo's super secret code matrix could not be transferred to another platform.
That new 3rd party service went out of business within a year (Yahoo has fared only slightly better treading water).
So once again I started over and rebuilt the site from scratch (that's four for those keeping track). This time I decided to use the popular "open" platform Wordpress, with its highly customizable theme-based structure, thinking it would be more "universal," since there were seemingly endless theme and expansion packages available for it.
But Wordpress proved to be slow and balky, crashing frequently and losing data with nearly every update. And because all but the basic layout functions are handled by adding third party plug-ins for each new feature, these tended to conflict with one other more often than not (not being tested for compatibility with anything but the base platform), causing features or entire sections of the site to malfunction (or not function at all), and crashing the site when any one of them were updated, even locking it up in a perpetual feedback loop on more than one occasion - a cycle which could only be broken by deleting one or more of the expansions, which naturally took all of my data with it.
Moreover, due to the very nature of this "plug-in" methodology, the site was once again not exportable to any other platform. So yet again I was faced with the seemingly inevitable task of rebuilding my site from scratch.
So after building the same site five times, I am now back to where I started, using Dreamweaver to build all my site content with universally recognized web code based on standard HTML and CSS. It is infinitely expandable, limited only by my time and willingness to learn, and can be transferred from one hosting service to another as I see fit. And it's the best site I've built yet. More importantly, the underlying code can be read and edited using any standard text editor. I can fix it if it breaks, and add new features as I learn to implement new code. If I see something I like on another website I can view the source code in my browser and see how it was done. I'm not limited by what the software can do, but what I can do.
You might be asking yourself at this point what this has to do with ebooks.
An ebook is, in essence, simply a portable website, designed as fixed or responsive page layouts, and based on a subset of the very same HTML and CSS that websites use. In general, if you know how to make a basic web page you can make an ebook too. You just need to learn the specific bits of code that makes the ebook work, and the rest is left to your imagination.
And best of all, the only thing you really need is a text editor.
The very same issues that plagued my web building experience for so many years also apply to building ebooks, so take heed. Programs that build your ebook for you do so by using their own proprietary code that often can't be understood by mere mortals such as we (unless you have the patience of a saint, or the wisdom of a god, which I do not). For example, they change the names of all your input source files, so that rather than having page23overlay2.jpg, you might find img000172.jpg instead, in your new HTML page called split0000159.xhtml. Good luck finding the correct file for page 23. Or the images it contains, if you happen to want to change one.
This is made all the worse by the fact that all of your carefully labelled CSS entries will have been changed in just the same manner, so that your styling instructions for #page23panel1 is now called data-app-amzn-ke-created-style0126, or some such nonsense. And more than likely all of your neatly organized HTML will be run together in an endless stream of code. Needless to say, this is not helpful in the least.
Unless you're a machine. And a very specific machine at that.
This applies not just to Amazon's proprietary Comic and Kids ebook creator tools, but also in varying degrees to iBooks Author, InDesign's ebook export function, and ebook editors such as Calibre and Sigil. The code they create can only be effectively read by them, thus locking you into using that same platform for all future updates to that file, until such time as their usefulness runs out, they become incompatible with your now-outdated file (or operating system) after an update, another software offers better features, or the company goes out of business.
Then you'll face the same dilemma I did building websites.
You'll have to build your ebooks all over.
From scratch.
Again.

For more in-depth reviews of Amazon's Kindle Comic Creator and the newer Kindle Kids Book Creator (for those still intent on using them), follow those links to my posts on the subject. But don't say I didn't warn you.