![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 100
Karma: 1204
Join Date: Jun 2012
Device: Bookari (née Mantano Reader) on Android; Kindle Fire HD
|
![]()
What are the current guidelines for images intended to be full-page illustrations?
Image position: The source document has the images float so they take up the page after their insertion point. I’m not finding any clues how to accomplish this in EPUB, and I’m rather suspecting it isn’t possible (and certainly not in MOBI/KF7 conversion), so how have folk here handled this? (Unless I get a better suggestion, I’m going to ask the author’s approval to move each of the images to the end of their respective chapters.) Image color: The images are scanned gray-scale line-art. (I was originally given JPEGs (!), but I’ve since received PSD files.) I understand that gray-scale PNG is the best format for this, but should I leave it as black & gray on white, or convert to transparent? On one hand, for readers like myself who prefer to set the background color away from white, a transparent background would be cleaner; on the other hand, some users might have set a reverse color theme. On the gripping hand, perhaps some e-readers choke on transparent PNGs? I’ve never seen PNGs used with transparent backgrounds, and I’m wondering why. Image resolution: The image resolution is ridiculously high: 5921×7008 in one case; and I’ve already seen some e-readers choke on that. (Besides, this will make the download file far bigger than it needs to be.) Is there a recommended resolution which will work on most EPUB readers while still displaying sharply on Kindles? Code: Is there any reason to use the SVG wrapper I’ve seen some recommendations for? Is there any CSS I should look for beyond text-align: center; height: 100%;? (ETA: Kindlegen tells me that my initial CSS, which included max-height: 100%; max-width: 100%;, is not supported, so I’m looking for a more portable option.) Last edited by jcsalomon; 05-23-2016 at 12:00 PM. |
![]() |
![]() |
![]() |
#2 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 100
Karma: 1204
Join Date: Jun 2012
Device: Bookari (née Mantano Reader) on Android; Kindle Fire HD
|
Seems I have a partial answer to image transparency, at least. The release notes for Kindlegen version 2.5 build 0626-3a91e28 includes
Quote:
Well, that was worth a try, anyhow; whether EPUB e-readers support transparency (and what happens when a white-on-black theme is applied) hardly matters if the primary audience won’t see it. Last edited by jcsalomon; 05-23-2016 at 12:41 PM. |
|
![]() |
![]() |
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,582
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
![]() |
![]() |
![]() |
#4 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 100
Karma: 1204
Join Date: Jun 2012
Device: Bookari (née Mantano Reader) on Android; Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,582
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
![]() |
![]() |
![]() |
#6 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 100
Karma: 1204
Join Date: Jun 2012
Device: Bookari (née Mantano Reader) on Android; Kindle Fire HD
|
Well, I’ve got something that works, anyhow…
Converting to SVG vector drawing is a no-go: maybe in the future, with another book, but right now it’s more work than seems worth it (also the images won’t appear on older Kindles). I’ve got PNGs scaled down to a maximum size of 1200×1600 pixels, and with their internal resolution set to 300 dpi. I could probably have chosen 1080×1440 at 300 dpi, since no e-reader I know of has a higher resolution than the new Kindles, but it’s a difference of only a few kilobytes. I’ve also gotten conflicting suggestions on PNG vs. GIF, and searching this forum doesn’t yield anything that looks authoritative. PNG it is for now, unless I get a good reason to change. As for the code, I think I’ve put something together that works. Following the suggestion in the thread E-Book Formats › ePub › Image size, I’m using @media inquiries to switch between the SVG wrapper and straight image inclusion. (If I’m told that max-width and max-height are better supported on EPUB-based readers than the SVG wrapper, I can add that back too.) The only trouble is that ADE (delenda est!) chokes on @media not, so I’m going with this: Code:
/* Images */ .img { page-break-inside: avoid; text-indent: 0; padding: 0; margin: 0; text-align: center; clear: both; } /* Defaults: ADE chokes on @media not */ .kf8-epub-default { display: inline; } .mobi-fallback { display: none; } @media amzn-mobi { .kf8-epub-default { display: none; } .mobi-fallback { display: inline; } } @media amzn-kf8 { .kf8-epub-default { display: inline; } .mobi-fallback { display: none; } } Code:
<div class="img"> <div class="mobi-fallback"> <img alt="Rachel’s steeplechaser" src="../Images/Steeplechaser.png"/> </div> <div class="kf8-epub-default"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 1200 1440" preserveAspectRatio="xMidYMid meet"><image width="1200" height="1440" xlink:href="../Images/Steeplechaser.png"/></svg> </div> </div> The CSS is based on suggestions in the threadE-Book Formats › ePub › Images in Sigil (ePub), with some additions I’m too tired to experiment with removing again. This at least works on the Kindle Previewer in all models and in ADE 2.0 on Windows. I still need to test it against some Android EPUB readers and get feedback regarding actual Kindles and Nooks. I hope this example of putting different suggestions together is useful to someone in the future. Last edited by jcsalomon; 05-25-2016 at 08:59 AM. |
![]() |
![]() |
![]() |
#7 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
When I wrote my "Tutorial: Formulas to PNG", KindleGen still converted Transparent PNG -> JPG, which was just PREPOSTEROUS: https://www.mobileread.com/forums/sho...d.php?t=223254 I haven't really tested it since then, and have been converting all transparent formulas -> white background beforehand. (It also compresses much better, and Indexed PNGs with transparency are... it depends [see the thread for the Kindle black box bug I ran into depending on the PNG compression tool]). Quote:
Bug to watch out for: Depending on which PNG compression tools you use, you should probably avoid 2-bit (4 color) and 4-bit (16 color) PNGs as some devices have display bugs. See GrannyGrump's topic here: https://www.mobileread.com/forums/sho...d.php?t=222916 I personally just settled on 17 color Indexed PNGs. But anywhere from 17-256 Indexed colors should be safe (since this forces it to be an 8-bit PNG). Last edited by Tex2002ans; 05-25-2016 at 07:39 PM. |
|||
![]() |
![]() |
![]() |
Tags |
illustration, image, image quality, transparency |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Full page images? | niki_johnson8 | Editor | 5 | 01-31-2015 01:06 PM |
Still on the same page after full page refresh | HansTWN | Kobo Reader | 0 | 08-20-2013 12:41 AM |
Seeing full page | shirazfb | Introduce Yourself | 6 | 12-14-2011 05:36 PM |
How do you handle double-page spread illustrations? | graycyn | Workshop | 12 | 11-14-2011 02:44 AM |
Full page images | graywolf336 | ePub | 3 | 11-17-2010 02:05 PM |