View Single Post
Old 11-26-2013, 04:44 PM   #5
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by davidfor View Post
Looking at those, none of them look like they would automatically resize the image to fit into the screen. ...
Unless I'm seriously wrong, as I said in the first post, all the images but "La reina sin espejo" have a height: 100% setting. That is a fit setting AFAIK, isn't it?

Quote:
Originally Posted by davidfor View Post
... And, trying some in Sigil demonstrated that to be the case. The Sigil preview window didn't resize the image to fit the fit the window. ...
At least in my PC, Sigil 0.7.4 seems to have some trouble rendering images which I don't remember from previous versions but I don't feel like downgrading. (A bug in Sigil?) Nevertheless because of all the things that are happening with Sigil, I think that a more confident test is done through Calibre viewer. And I swear that they make a perfect fit in Calibre.

I'm telling a white lie here. They make a perfect fit EVEN in "La reina sin espejo" which actually doesn't have any kind of height setting. In my first post I supposed that in this situation the standard rendering was showing the image with its original size. Maybe the software can actually choose what to do in that case with no explicit setting?

Quote:
Originally Posted by davidfor View Post
... While that isn't a perfect test, it does suggest that the ACCESS renderer is working as designed.
I cannot follow you. Why do you say that ACCESS is doing the expected thing if it is not following an explicit height: 100% setting? As I post it's normally making a perfect width: 100% but then height is 118% (or whatever).

Quote:
Originally Posted by davidfor View Post
The usual suggestion for coding the cover is something like the following.

Code:
<div>
  <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 476 714" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
    <image height="714" width="476" xlink:href="../Images/cover.jpeg"></image>
  </svg>
</div>
The height and width need to be changed to match the image. When that is done, it resizes the image to the screen perfectly.

Oh, and just as a coincidence, I started reading a purchased kepub shortly after your original post. Its cover had the same problem. The code for the cover is:

Code:
<body>
  <div id="book-columns">
    <div id="book-inner">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <span class="koboSpan" id="kobo.1.1"><img alt="" src="../Images/cover.jpg" /></span>
      </div>
    </div>
  </div>
</body>
Again, nothing tell it to resize here or in the CSS.
Again I'm no expert so I am possibly wrong. But look how in your svg code (which is not an img tag but a combination of newer svg and image tags) you have both the size of the image in pixels AND a resizing through height and width 100% plus an aspect ratio preserving setting.

I mean, unless I'm seriously wrong the resizing of the image is always done through the 100% setting which my examples have.
arspr is offline   Reply With Quote