View Single Post
Old 05-07-2015, 01:06 PM   #2
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Assuming you're talking about epubs (not pdf) ...

You can't choose a 'magic' image size but you can code your books so that the cover image will automatically expand to fill whatever screen size your device has. Based on your post I have no way of assessing how familiar you are with editing epubs, but the following is some sample code to achieve what you want. Use it for the epub's cover html.:
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <meta name="calibre:cover" content="true"/>
  <title>Cover</title>
  <style type="text/css" title="override_css">
  @page {
      padding: 0;
      margin: 0;
      }
  body {
      text-align: center;
      padding: 0;
      margin: 0;
  }
  </style>
</head>
<body>
  <div>
    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 1365 2100" preserveAspectRatio="xMidYMid meet">
      <image width="1365" height="2100" xlink:href="../images/cover.jpeg"/>
    </svg>
  </div>
</body>
</html>
  • The red numbers need to be the actual dimensions of your chosen cover image. The example shows a 1365x2100 cover image.
  • The blue path is the internal epub path to the cover image file.
  • The Green part, preserveAspectRatio="xMidYMid meet", assumes you want to retain the correct aspect ratio of your chosen cover. If you prefer edge-to-edge on all 4 sides and don't mind some distortion use this setting instead, preserveAspectRatio="none"

If you're already using the Calibre software to manage all your books on a PC or Mac then it has simple features to apply the above style of covers to all your epubs at the press of a button.
jackie_w is offline   Reply With Quote