Quote:
Originally Posted by slowsmile
@st_albert...You said that this code, containing % width:
Code:
<p class="center"><img alt="images/image002.jpg" src="../Images/image002.jpg" style="width:77%"/></p>
...Was turned into this code on KF7:
Code:
<p height="0" align="center"> <img alt="images/image002.jpg" src="Images/image00019.jpeg"/> </p>
The most urgent question is -- Did the KF7 display the image correctly(the second version) on a Kindle device in the test above ?
I also know that your second example(with no image dimensions) is exactly how Jutoh codes Kindle ebooks for mobi.
This is highly relevant to our discussion and I'm sorry to have missed it earlier. So does that mean that all you have to do for Kindle is just ensure that you code all ebook image widths as a % value for both KF8s and KF7 devices and they will display correctly? Therefore is there any real need for a new plugin?
I wish I had a KF7 device to test out this theory...
|
No, as far as I know, kindlegen (probably version 1.x?) just ignored the width:"70%". This was published in mid-2011, about 3 months before Amazon introduced KF8 to the public.
At that time, I didn't realize that image dimensions had to be in pixels, so I didn't understand why it wasn't working, only that it didn't work as expected at first. What I ended up doing (I think -- my notes are a little vague) was to manually resize each individual image to an appropriate width, determined by trial-and-error using an actual Kindle 3 (which at that time, of course was a KF7 device.) Thus, a jpeg with a width of 360 px would give an equivalent to width:"60%" on the K3's 600x800 screen. In my case, the K3 didn't blow up the images to full screen.
So, no, looks like you have to end up with image sizes in pixels in the epub you run through kindlegen. Perhaps your plugin could convert % to px, based on a standard (perhaps user-definable) screen width in pixels?
Albert