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 04-04-2012, 05:58 PM   #1
Kratos
Connoisseur
Kratos began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Mar 2011
Location: UK
Device: Kindle 3, iPhone, iPad, PC
Smile How do I display images Relative to Page Size in Kindle books?

Hi everyone. I'm creating a book with multiple images which I want to make available specifically for the Kindle store.

I'm using Indesign 5.5 on a Windows 7 PC. I am exporting it as an epub. When I export I choose the Relative to Page Size option. In an age of multiple size device screens Relative to page size is the logical option because it should be able to make images on a page fill roughly the same percentage of the screen size whatever device you read it on.

When I view my epub on a PC or even high resolution iPad 3 the images look big which is great. I have then used Calibre to convert the file to .mobi format. I have viewed the .mobi file on Kindle app for PC, the Kindle Fire, the Kindle Keyboard and the Kindle app for the iPad and the images are NOT displayed relative to page size. In fact the images look ridiculously tiny on the high resolution iPad 3 screen.


The Relative to Page Size code that Indesign creates for an image looks like this:
Code:
<img class="image" width="52%" src="images/sky%20kf%202_fmt.jpeg" alt="sky%20kf%202.jpg"/>
It doesn't seem to work for Kindle. But is there another way to make images display relative to page size on the Kindle? Considering the range of device screen sizes (especially the new iPad 3) it seems absolutely necessary.

Any help, thoughts, ideas, knowledge would be appreciated!
Kratos is offline   Reply With Quote
Old 04-04-2012, 06:40 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,545
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
In short: you can't.

EDIT: I'm referring to the standard MOBI format and not the new KF8 format.
DiapDealer is online now   Reply With Quote
Old 04-05-2012, 06:25 AM   #3
Kratos
Connoisseur
Kratos began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Mar 2011
Location: UK
Device: Kindle 3, iPhone, iPad, PC
Quote:
Originally Posted by DiapDealer View Post
In short: you can't.
That's not good.

I'm trying to find a way to make the book look better on the iPad 3. I've deconstructed a couple of Kindle books that seem to display their images a bit larger and have had a look at the code for their images.

The image code is listed like this
Code:
<img alt="mountain" src="images/mountaintop.jpg" class="calibre2"/></span></p></blockquote>
And the CSS reference like this:
Code:
.calibre2 {
    height: auto;
    width: auto
    }
I'm not a CSS expert so I'm wondering where auto height and width work.

Should I just export using a fixed image size and make sure the images are 100% or more?

Kindle Format 8. Does relative page layout work with that?
Kratos is offline   Reply With Quote
Old 04-05-2012, 08:07 AM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,545
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
CSS doesn't work at all in the MOBI format (pre-KF8). All CSS gets converted to HTML 3.2 attributes (if possible) when the MOBI gets built.

You say you've "deconstructed" some Kindle books, but I'm seeing calibre CSS, so I suspect you've either converted it to ePub or HTML (or you've captured the intermediate OEBPS step of a conversion using calibre's debug feature). That's not deconstruction per se... that's conversion. You'd need to use something like mobi_unpack.py to view the raw mobi markup code that's actually being implemented inside a MOBI file. There's also a calibre plugin version of the mobi_unpack.py script that may be of use to you.

The KF8 format can achieve pretty much anything that can be done with the ePub format.

Last edited by DiapDealer; 04-05-2012 at 08:11 AM.
DiapDealer is online now   Reply With Quote
Old 04-05-2012, 09:09 AM   #5
Kratos
Connoisseur
Kratos began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Mar 2011
Location: UK
Device: Kindle 3, iPhone, iPad, PC
Thanks for the reply DiapDealer.

I've installed the newest version of the Kindle Plugin for Indesign. Its a beta but allows you to export a mobi that apparently works as a mobi and KF8 file. My initial test shows that after conversion all images in my book display a large size. On a Kindle Keyboard and an iPad 3. So i suspect that there is a way to make images display relative to page size with mobi.

The only downside so far is that after I create an epub I have to edit the toc file because I have images as my chapter headers. But I will try the software you mentioned and experiment some more.
Kratos is offline   Reply With Quote
Old 04-05-2012, 09:11 AM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Kratos View Post
I'm trying to find a way to make the book look better on the iPad 3.
In that case you should not use Calibre to convert your ePubs. Calibre can read the new KF8 format, but cannot write it. Whenever it encounters styles not supported by the old MOBI format it tries its best to replace them with HTML code that older Kindles and other readers and apps with MOBI support can display.
Since KF8 offers a much better ePub support and Amazon plans to add KF8 support to all Kindle apps you're better off generating hybrid Mobi/KF8 files with the Kindle Previewer or Kindlegen 2.
BTW, you can use media queries to specify different styles for the Kindle Fire and older Kindles.
For an example see Liz Castro's excellent article "Media Queries for formatting Poetry on Kindle and EPUB."
Doitsu is offline   Reply With Quote
Old 04-05-2012, 09:19 AM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,866
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You might be able to use height="100%" in your image tags. But I can't say if Mobi supports this. ePub does.
JSWolf is offline   Reply With Quote
Old 04-09-2012, 05:51 AM   #8
Kratos
Connoisseur
Kratos began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Mar 2011
Location: UK
Device: Kindle 3, iPhone, iPad, PC
Quote:
Originally Posted by JSWolf View Post
You might be able to use height="100%" in your image tags. But I can't say if Mobi supports this. ePub does.

The Kindle Publishing Guidelines seem to think it is possible.
Quote:
Image Guideline #9: Controlling Image Aspect Ratio. To preserve aspect ratio of images, width and height cannot both be set to a fixed percentage. Either width or height can be set to the fixed percentage (such as 100%), but then the other property should be set to “auto” to preserve the aspect ratio.
What I did was export the epub with images set to display at a relative page size. I unzipped to edit it. I added height="auto" in each image reference. Then converted to mobi but images still did not display relative to page size.


I mean the Kindle plugin for Indesign DOES work and displays images relative to page size. However it doesn't give the option to break the pages at a certain paragraph style. I want this because it looks untidy if the cover page goes direct into the foreward into the chapters. Is there a way around this?
Kratos is offline   Reply With Quote
Old 04-09-2012, 08:23 AM   #9
Kratos
Connoisseur
Kratos began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Mar 2011
Location: UK
Device: Kindle 3, iPhone, iPad, PC
Is there anything I'm missing?

Last edited by Kratos; 04-09-2012 at 10:20 AM.
Kratos is offline   Reply With Quote
Old 04-09-2012, 09:37 AM   #10
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Kratos View Post
Is there anything I'm missing?
Maybe.

Kindlegen adds the zipped source files to the mobi file, which will increase the file size. Also Kindlegen 2.x creates hybrid mobis that contain mobi files for older readers and the Kindle Fire (and the source files). If you plan to publish your book on Amazon, you won't have to worry about the size because your readers will get only one of the two mobi versions and no source files. I.e. the actual file size will be much smaller.
Doitsu is offline   Reply With Quote
Old 04-09-2012, 10:18 AM   #11
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,545
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
If you plan to publish your book on Amazon, you won't have to worry about the size because your readers will get only one of the two mobi versions and no source files. I.e. the actual file size will be much smaller.
Exactly.
DiapDealer is online now   Reply With Quote
Old 04-09-2012, 11:15 AM   #12
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,866
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Kratos View Post
The Kindle Publishing Guidelines seem to think it is possible.

What I did was export the epub with images set to display at a relative page size. I unzipped to edit it. I added height="auto" in each image reference. Then converted to mobi but images still did not display relative to page size.


I mean the Kindle plugin for Indesign DOES work and displays images relative to page size. However it doesn't give the option to break the pages at a certain paragraph style. I want this because it looks untidy if the cover page goes direct into the foreward into the chapters. Is there a way around this?
You don't use height=auto. That doesn't work.

You use height="100%" as long as you have no top/bottom margins.
JSWolf is offline   Reply With Quote
Reply

Tags
image size, kindle, mobi, relative to page size

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the Kindle 3 to display page #'s? s1mp13m4n Amazon Kindle 48 04-05-2012 03:20 PM
Kindle Fire doesn't display some images in MOBI file RobFreundlich Devices 2 03-25-2012 07:15 AM
Size of page images for Kindle gdgibson Kindle Formats 3 02-16-2012 02:56 AM
controlling display size of images for mobi Fire photoluminations Conversion 11 10-23-2011 07:13 PM
Envisaging the size of the Kindle DX display AprilHare Amazon Kindle 5 05-08-2009 11:38 PM


All times are GMT -4. The time now is 08:40 PM.


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