Open DavidGriffith opened 4 years ago
This is strange, it works correctly on my machine. This is my <img>
element in badcover.html
:
<img src="badcover.svg" alt="PIC" />
Maybe you have some additional attributes here?
<body
>
<div class="cover-image">
<img
src="badcover.svg" alt="PIC"
/></div>
So this is the same. Maybe it is a bug in (or feature?) in Calibre? It seems that it crops the image only in the library view, it displays it correctly when I open the book in ebook-viewer.
Alkdiko on Android does this too.
Here's the bad epub so we can see if this renders poorly for you. badcover-epub.zip
I can't put a finger on exactly what causes this, but now that I found it, I can't seem to create a demo EPUB that results in a correctly-rendered cover. The problem is that if I do
\coverimage{cover.svg}
, an epub reader will render the cover strangely cropped. Sometimes it was a strip off the bottom. More recently three quarters of the SVG is removed. If I do\coverimage{cover.png}
, the image appears as it should.To recreate a misbehaving EPUB, do
tex4ebook -xs -f epub3 -c badcover.cfg badcover.tex
:Here's how Calibre renders the bad graphic:
Here's the SVG: badcover.zip
Here's the PNG as created with
convert badcover.svg badcover.png
: