Before we can continue building our fixed-layout ebook we'll need some content to put in there. This is, of course, the reason we're here undertaking this project, so I would presume you already have something you want to make an ebook out of, and as we're focusing on fixed-layout format you've likely got some heavy art to include. First, however, you must understand the nature of the medium that you'll be working in.
In standard ebooks the size and placing of elements onscreen can change, which makes everything relative to everything else. But in fixed-layout ebooks everything is...well... fixed, and consequently the size and position of every element is absolute. In order to place those elements accurately, therefore, you must know precisely where you want them to be and how to put them there. This will require a slightly technical explanation, so bear with me for a moment.
DISPLAY RESOLUTION
The current iPad screens contain 1024x768 pixels at a resolution of 132 pixels per inch. However, the pixel density of 132 is irrelevant since the total number of pixels is fixed. In print, a resolution of 100 pixels per inch would make a 1000x1000 pixel image print out at 10" x 10" square, whereas a resolution of 200 pixels per inch would make that exact same image print at only 5" x 5". But on a fixed digital screen both images will appear exactly the same, although a higher resolution image will generally look crisper since the original art will tend to have more detail.
The iPhone4S and iPod Touch have a screen resolution of 960x640 pixels at 326 pixels per inch. With nearly three times the density of pixels, the smaller screen has nearly as many total pixels (614,400) as the larger, but lower resolution iPad (786,432 total), even though the iPhone display is only 3.5" and the iPad nearly three times that at 9.7". This is why the smaller screen has the ability to display almost as much detailed content as the larger one.
To make matters worse, resolution will continue to increase until the larger tablet screens reach the pixel density of the smaller ones. Fortunately for us, 326 pixels per inch is pretty much the upper limit of the human eye's ability to discern individual details, so increasing pixel density further would be pointless. But when the iPad's 9.7" screen reaches the iPhone's level, its total pixel area will be 2529x1897 for a massive total of 4,797,513 pixels, every one of which you'll need to fill with content and color.
Now, some of those pixels can be duplicated, so that, for example, one pixel in a 1024x768 image created today will be displayed by a 4 pixel square in the 264-ppi 2048x1536 display rumored to be coming on the iPad 3 due out this April. Theoretically, the image should look pretty much the same, although in fact it will be zoomed and pixelated and somewhat fuzzy by comparison, since that 1024x768 image will only fill the middle of a screen with four times as many pixels (twice as many wide, and twice as many high), and it will be the display processor that calculates what color to make those extra pixels, not you. Crisp edges will become fuzzy where black meets white and the display logically selects three shades of gray as a compromise for the three new pixels it must fill in when zoomed to full screen resolution.
More importantly, these are all pixels that could contain more detail and present a clearer, crisper image. For this reason it is recommended that you always create artwork at the highest resolution possible to future-proof your hard work against the higher resolution screens that are surely coming. In the iBookstore Asset Guide Apple themselves recommend using images that are "at least twice their intended display size" for this reason, as well as enabling users to zoom in to see more detail.
FILE SIZE LIMITS
Complicating matters are two further issues we must take into consideration. First is Apple's two million pixel limit for each individual image. This is apparently not a hard and fast rule, but images larger than this may not display properly, or cause the iBooks app to crash. Given this restriction, the largest single image size legally allowable in the iPad's 4:3 aspect ratio would be 1224x1633, a total of 1,998,792 pixels. Of course, you can place more than one of these on a page, and two of them side by side makes up a full landscape spread. But this brings up our next consideration, which is total file size.
Since .epub files use .zip compression in their packaging, they must adhere to the zip archive's current 2 Gb limit, and this is a hard and fast rule which cannot be broken. Now, two gigs is a pretty enormous file, so there's really not a lot of concern here. But as files get bigger and enhanced ebooks include more content, it becomes increasingly possible this limit might be reached, particularly if a lot of video is embedded. The 28 images included in my Ring Saga sample chapter bring its total size to over 24 Mb - a long way off from two gigs, but it's only one chapter of a proposed 450-500 page project, each page of which is roughly 1 Mb at a quality setting of 10 in Photoshop. More compression can, of course, bring these file sizes down, and may be necessary for the final complete ebook. But where quality is concerned, the less compression the better. It's a compromise each ebook artist will have to make for themselves. And if screen resolution continues to increase, even these image sizes will be too small.
The bottom line is that when you're creating high quality artwork for a graphic novel or illustrated ebook with full-page images, you should ideally create them as close to the two million pixel limit as possible and work from there. I create my original artwork at upwards of 4000x3000 pixels or so and then shrink to fit. The iPad, by the way, automatically resizes larger images to fit the screen, in whichever orientation it's being viewed. You can double-tap to view full screen, or pinch and zoom to view the image at full size.
ACTUAL IPAD SCREEN SIZE
Although the iPad's total screen size is 1024x768, Apple's "recommended page size" in the Asset Guide is only 985x738, due to space taken up by the faux book pages and menus. Consequently, this is the size I've used in the template to give you the official example. However, since the upper and lower menus go away (leaving blank space above and below the pages), if you want to completely fill a horizontal view with a two-page spread, the actual optimized page size you should use is 1024x682, or increments thereof. At this aspect ratio, the maximum image size within the two million pixel limit would be 1732x1154 (1,998,728 pixels).
Recent updates have included the option to turn off the faux book borders in standard iBooks editions, via the font display menu, but since this menu is not available in fixed-layout iBooks, the faux book pages are there whether you want them or not. This may change at some point down the line, of course, particularly seeing that the new .ibooks format no longer has them (although they may just be turned off in the few textbooks I've looked at). But for the time being, you'll want to take them into consideration when creating your art layouts, as I have done above, since removing them will slightly alter the full page aspect ratio.
SPANNING IMAGES
Fixed-layout iBooks actually allow you to use a single image to fill a two-page spread by spanning the image across the pages. However, given all I've just said I highly recommend against this, since Apple's pixel limit only applies to each individual image. If you use one image to fill two pages, you have effectively cut the maximum size of your artwork in half, with only one million pixels per page. This is still enough to fill up the pages currently, but only just, and tomorrow it will look like crap. Additionally, it's a whole lot of extra effort and confusion to format for no real good reason. It is vastly easier to cut an image precisely in half in Photoshop than to span it across two pages. You have to create two separate page files either way, and the seams match up perfectly. This is what I've done in the Ring Saga sample, so have a look at that as an example.
However, in the interest of giving you a full range of options, I'll include the information anyway, as there may be occasions when it could be handy. For example, if a smaller image runs across two pages of, say, a magazine-style layout, or a travel guide or some such, particularly since this would allow you to adjust the image placement without having to go back in to Photoshop and crop it up again.
But I won't get into that just yet. First we'll build some single pages.
NEXT UP: Creating Your Cover
Dear Scot,
ReplyDeletethank you for this amazing guide. I work for a small children's book publishing house and I'm trying to make the first step towards selling content for iPad. I've made several flowable epubs so I know the basics but after formatting a book with fixed layout I encounter an issue that I am not able to solve: getting the itunes to display the cover. I've spent hours going through your template and one of your sample books and I think I've got mine to look exactly like them but when I put it in the itunes library it won't show the cover (epubcheck 1.2 validates it though). ¿Do you have any idea of what could I be doing wrong? I'm using dreamweaver by the way.
Thanks again for your time, you've done more than enough already with this tutorial.
Are you referring to adding the book to the iTunes library on your computer, or into the iBooks library on your iPad? Does you book open correctly otherwise? Is there another page displaying as the cover instead, or is it just blank?
ReplyDeleteThe cover should show up in iTunes/iBooks if it's in an accepted format (.jpg, .png, or .tif and in RGB color mode rather than CMYK) and the metadata section of the OPF contains the "cover" element, the "content" value of which must equal the manifest "item id" for that image.
Let me know if this helps, or if you continue to have trouble.
Best of luck.
Hi Scot,
ReplyDeleteI came here stumbling with iBooks Author and questions related to image resolution. I am working on sort of multimedia photo book using HTML Widgets for added interactivity.
I wanted to add that the available area in iBooks Author seems to be 1024 by 748px in landscape. The missing 20px go for the standard iOS menu with connectivity information, clock and battery status. This menu gives space when for example a movie or HTML-Widget goes to fullscreen mode. When using iBooks Author, there are no "faux book pages"!
This resembles the resolution of iPad 1 and 2 and leaves the question on how to support the retina display of the new iPad. If you place images in iBooks Author, the App renders the image if the resolution is higher. You cannot zoom the image in iBooks on iPad, I think. Although you can pinch, zoom and rotate the image I don't have the impression this increases detail. So basically I have the feeling that iBooks on iOS and iBooks Author only support the old, non retina resolution of iPads for images.
And there were releases of both programs connected to the release of the New iPad.
iBooks Author does not resample images included to the eBook through an HTML Widget. But iBook on iOS does easily render HTML5 incorrect if you work with large images.
So as a conclusion, I found no way to support full resolution (2048 x 1536 or twice that!) images in iBooks Author for the New iPad at this time.
Do you have other experiences?
Unfortunately you're right that iBooks Author only allows images up to 1024x748 to be used, with larger resolution being resampled down. You cannot tap to zoom either as you can on standard iBooks, although you might try linking the smaller display image to a larger one stored in the image folder. Don't know if that will work, but it's worth a try.
ReplyDeleteNot only are there no faux book pages in iBooks Author titles, but there are no page turns either! The pages slide from right to left instead of using the animated page turns, which I find disappointing. I like the new centered hardback cover though.
As for inserting images via HTML widgets, that may be the solution, provided you still remain within the 2 million pixel limit. An image at 2048x1536 has 3.14 million pixels, so if that's the size you're using it may account for why they're rendering incorrectly. Try inserting images no more than 1600x1200 in size and see if those work. That would make them just under two million pixels each.
Apple have put themselves in a hard position by having two different resolution iPads, as they still need to support the earlier version. Book created with iBooks Author must work on both displays, so they can't just jump to full support of higher resolution. My guess is that in a year or so they'll move to higher resolution output for iBooks Author. But there are over 15 million iPad 2's in use, so they can't just ignore them and produce books those devices can't display correctly.
I'm interested to see what you do with your photo book, and I'd like to know more about the HTML widgets you're using. Stay in touch and keep me posted on your progress.
Cheers!
Hi Scot,
Deletethanks for the information. May I ask where from do you know about the resolution supported by iBooks Author? I mean there was a release of iBooks for iOs and iBooks Author to support the retina display of the new iPad. But I guess you are right, as one can clearly see the higher resolution for fonts and icons but not for images.
I don't think linking of images will work as it is not an option in iBooks Author directly. You could do with an Widget, but I was not able to see the higher resolution this way either.
I think Apple could have supported images for both resolutions. They could have advised authors to use the higher resolution whenever possible and scale it to the lower either when publishing (like they do with most other graphical items like icons) or when presenting on iOS. From my experiments I have the feeling that either iBooks, the rendering engine used ot the iPad itself is not able to handle such large images. The iPad 2 is even better animating large pictures than the new iPad.
Regards from munich
Micsi
HTML Widgets are specialised folders holding the HTML and all required elements. Next to that, they contain a preview image and configuration.
DeleteThose widgets originated, as far as I know, as dashboard widgets. There is a developer tool from Apple, Dashcode, assisting you with creation of those. With iBooks Author, some HTML5 tools were updated to directly create HTML widgets.
In iBooks Author, you can place them anywhere on your page. They are displayed with the preview image until you click them, so no autoplay is possible. When you click them, they will be run in fullscreen mode. They can be stored localy or can interact with the Internet.
There are two free eBooks from O'Reilly on the subject:
HTML5 for Publishers http://shop.oreilly.com/product/0636920022473.do and Publishing with iBooks Author http://shop.oreilly.com/product/0636920025597.do
The first speaking of HTML Widgets and the latter linking to the first ;-)
I only know about the image limit by talking to other people who have the same experience. I don't use iBooks Author myself as I have no need to. Also, I don't have a Mac.
DeleteThe two million pixel limit is discussed in the iBooks Asset Guide, so I know you cannot use full resolution images at 2048x1536. But since you mentioned that images in the HTML widgets were not resampled, I wondered if you could insert or link to larger images so long as they were within this 2 mil limit.
I tried that as well as some zooming JS-Libs. They work, but I cannot see a significant difference in resolution. I am a bit stumbled to how this is done ;-)
DeleteI can see the difference for fonts and for example the close icon...
Hi Scot. I am creating an iBook and testing it on an iPad2. In my ebook, the size of a page is 738px by 752px and in my CSS files I am defining the size of a full screen image as follows:
ReplyDeleteimg {
width: 738px;
height: 752px;
}
The actual size of my images is such that the total number of pixel is just below 2 million. The images are then resized by the CSS. On the iPad2, everything works as expected, and I see a full page image.
I don't have an iPad3 with me, so I can't test my ebook on it, but my concern is: what happens if I load this book on a higher resolution device? My initial thought was that I should see my image very small on the screen, since the CSS is telling the iBook reader to render the image as a small 738x752 image.
As this can't be the case, what exactly tells the iBook reader on an iPad3 that I actually meant to show a full page image?
Is it the tag:
meta name="viewport" content="width=738, height=752"
in each html file that tells the iBook reader that this is the size of a full screen page and so it resizes and resamples the page so that it becomes 1476x1504px?
Hello Lorenzo,
DeleteYes, your last assertion is the correct one. The "viewport" size is what determines the full page size, and this is being scaled up on the higher resolution iPad3 to fill its screen.
However, if you add the image height/width data in the CSS that is what will determine how big that specific image displays relative to the full page, so you are right that if you leave it your image will appear very small on the iPad3, because it will remain at 738x752 and not scale with the rest of the page.
In either case, you should delete those dimensions from the CSS, as they are both unnecessary and will prevent both scaling and zooming from working correctly. An image larger than 738x752 will automatically scale down to fit within the screen, but if you add those dimensions in the CSS it will not scale up if the display is larger.
Thanks Scot, this is very helpful.
DeleteOne more question. What about if I want to show an image which needs to be smaller than my page size, say half of it, 369x376? Should I set a percentage size in my CSS rather then an absolute size in pixel:
img {
width: 50%;
height: 50%;
}
so that it will scale up nicely on the iPad3?
Yes, exactly. That would be my recommendation.
Delete