View Single Post
Old 03-07-2017, 12:22 PM   #4
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
Quote:
Originally Posted by Turtle91 View Post
The svg wrapper will allow you to properly scale an image to fill the whole screen while keeping the proper aspect ratio.
As @GrannyGrump also mentioned: Reading your statement, I thought at once: That can be so only by luck!

A word to your recommendation to look around. I know you mean this amicably and I can make you sure: It isn't like I wake up in the morning with an question and think: OK, let's ask in mobileread. I grappled with this image issue already since weeks - I looked obviously on the wrong places.
Of course I recognized preserveAspectRatio="none" in the malfunctional code and that it should say something else than none. But please keep in mind: Knowing nothing (or not enough) it's difficult to decide, what is important to look for.

Quote:
Originally Posted by GrannyGrump View Post
If you use "preserveAspectRatio="xMidYMid meet", the image will never get distorted, no matter the size of the device screen. But you will, of course, get borders along the edges that don't meet the screen edge.
Thanks, your code fits my needs exactly (for covers). But I changed the values as follows: height="800" width="600"
As quick I felt confident I start to change that <img>issue everywhere.

xlink:href="cover.jpg" or xlink:href="../Images/cover.jpg" depends, how the cover-image is named (with path or without). Is that correct???

My images come normaly just as cover.jpg, or after conversion, as cover.png.

Last edited by chaot; 03-07-2017 at 01:43 PM. Reason: that issue → that <img>issue, add: for covers
chaot is offline   Reply With Quote