View Single Post
Old 12-15-2012, 04:15 AM   #9
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,861
Karma: 2714881
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Even if it is SVG 1.1, certain things won't work. Things like animation, scripting and a lot of options with regards to text will not work.

Yes, an image in a SVG wrapper will give better results with scaling. As an example, the code I use as a base for my covers are:
Code:
<div>
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 522 800" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
      <image height="800" width="522" xlink:href="../Images/cover.jpg"></image>
    </svg>
  </div>
The viewbox and image resolution must be equal to the resolution of the image. The width and height are set to 100%. That means that the image is scaled to either the maximum width or height of the screen, depending on what is reached earlier. If the screen resolution is below the image resolution, the image is rescaled upwards. If the image is larger, the image is scaled down.
The aspect ratio is preserved.
Toxaris is offline   Reply With Quote