View Single Post
Old 08-15-2017, 04:49 PM   #73
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 698
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by Hitch View Post
...

Because if we agree that the CSS means 50% of the containing block, then I don't understand why you think that this coding is working. Please see attached images, for screenshots from the emulator (which I think I demonstrated, last night, is working--do we all agree on that?). I've attached:
  • Screenshot from the KP2.94, FireHD;
  • Screenshot from the KP2.94 Fire HDX;
  • Screenshot from the KP2.94 Fire HDX 8.9";
  • Screenshot from the KP 2.94 Voyage; and,
  • Screenshot from the KP2.94 DX emulation.

Your coding says, 50% of the width of the screen, which is the containing block because the Scrivener 5 class doesn't constrain the size; you use it to center the image, only (and provide top margin spacing). Right?

Well, Wiliam, that Eagle damn sure ain't half the screen, in the DX. The DX is 824pixels wide, so this SHOULD be ~400px in width--and it's obviously not, given the original image is 90px wide. Is this what you're seeing, at your end? My best estimation is that the eagle is displaying slightly over its original size. Perhaps, 125-150% of its actual size.

The KF8s all seem to be about right. Do we all agree on that?

What am I missing? I mean that; we all know that I don't code daily, so I forget stuff. Freely admit it. What's working, in the DX screenshot? I mean, as it happens, the size of the Eagle image, on that screen, for that moment, works, even though it's not obeying the coding, but that's...coincidence. If it were, say, twice the size, it wouldn't.

So: what do you think is happening here? To me, this isn't working. To me, it's displaying the image at just a bit over full-size. About 125-150pixels. Not half the size of the image, nor half the size of the screen. Hell, I don't know where it derived the size, unless we assume that like all images on KF7, the DX simply blew it up some percentage, attempting to make it fill the screen, as is KF7's wont.

Anyone else have thoughts on this? I mean...if I'm not understanding what I'm seeing, I'm happy to hear them.

Hitch
I concur with your observations. My take is that the KF7 version of the mobi file simply ignores the width specification (probably doesn't even include them in the kf7's html.). I haven't had time yet to dissect the mobi file to check on its coding, though. (*)

See my post #71 above. I duplicated the image code on the title page , then changed the width of the second image to 20%. On KF7 emulators, both images were the same size, and seemingly < 50% of screen width. On KF8, they were different sizes, but I'm still not sure that the larger was all of 50%. Maybe I need to put a border on the actual image to see what its bounds are.

Albert

* Edited to add:
When I looked inside the dual mobi, split apart with Kindleunpack, here's what I found regarding how the images were coded.

First, code in the modified test2 starting epub (on the title page) was:
Code:
  
<p class="scrivener5"><img alt="" src="../Images/eagle.jpg" style="width: 50%;height: auto;"/></p>

<!-- same image again, but width:20%  -->

  <p class="scrivener5"><img alt="" src="../Images/eagle.jpg" style="width: 20%;height: auto;"/></p>
whereas, kindlegen did the following:

coding in the book.html file from KF7 book (linefeeds added)

Code:
<mbp:pagebreak/><a id="filepos910" />
<p height="1em" width="0em" align="center">
<font face="Times New Roman">
<img alt="" src="Images/image00018.jpeg"/></font>
</p> 
<p height="1em" width="0em" align="center">
<font face="Times New Roman">
<img alt="" src="Images/image00018.jpeg"/>
</font>
</p>
Note that both are now identical and have no width/height specs at all.

coding in corresponding kf8 file:

Code:
  <p class="scrivener5"><img alt="" src="../Images/image00018.jpeg" style="width: 50%;height: auto;"/></p>

  <p class="scrivener5"><img alt="" src="../Images/image00018.jpeg" style="width: 20%;height: auto;"/></p>
Thus it is clear that coding width/height in % in the source epub has no impact on the KF7 mobi file. I.e. it is completely ignored.

-- A.

Last edited by st_albert; 08-15-2017 at 05:25 PM. Reason: more details
st_albert is offline   Reply With Quote