Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 04-20-2018, 08:51 PM   #1
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 767
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Upgrade to epub3, ADE, and cover

I upgraded an epub2 to epub3 to experiment/learn

Using ADE the epub3 cover image is greatly distorted

It 'seems' to be an ADE problem since the editor's File Preview is fine

Can anyone confirm it's an ADE issue?
Attached Thumbnails
Click image for larger version

Name:	epub2.JPG
Views:	92
Size:	78.1 KB
ID:	163582   Click image for larger version

Name:	epub3.JPG
Views:	94
Size:	89.4 KB
ID:	163583  
phossler is offline   Reply With Quote
Old 04-21-2018, 12:47 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,223
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Is that the actual cover (i.e. the first page of the book) or just the cover image?

It's help if you posted a sample epub to re-create the issue. Although I dont think I even have ADE newer than 1.7.x installed at this point
kovidgoyal is online now   Reply With Quote
Advert
Old 04-21-2018, 07:36 AM   #3
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 767
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
They were screen shots of ADE v4.5.7 of the 'before' and 'after'

I loaded my epub2 version from a backup, upgraded it to epub3, and saved a copy


I did look at 'What's Changed' and saw a few references to Cover, but they all looked pretty harmless (to me at least, but then a lot of my changes do)

Last edited by phossler; 04-21-2018 at 07:39 AM.
phossler is offline   Reply With Quote
Old 04-21-2018, 08:19 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,223
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The EPUB3 looks fine to me and the cover displays properly in the ADE 1.7.2 that I have...so I have no idea what problem ADE 4 has, sorry.

Last edited by kovidgoyal; 04-21-2018 at 08:49 AM.
kovidgoyal is online now   Reply With Quote
Old 04-21-2018, 08:51 AM   #5
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 767
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Thanks for checking

I figured it was an ADE issue
phossler is offline   Reply With Quote
Advert
Old 04-21-2018, 12:19 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 4,832
Karma: 21644938
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, Tolino epos
Quote:
Originally Posted by phossler View Post
Thanks for checking

I figured it was an ADE issue
I took a quick look at your epub file and you might want to make a change in the code used for displaying the cover image. The current code is:

Code:
    <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 306 423" preserveAspectRatio="none">
      <image width="306" height="423" xlink:href="../Images/cover.jpg"/>
    </svg>
I would recomment changing it to:

Code:
    <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 306 423" preserveAspectRatio="xMidYMid meet">
      <image width="306" height="423" xlink:href="../Images/cover.jpg"/>
    </svg>
This change in preserveAspectRatio should improve how your cover image displays. Could you check the attached modification of your epub3 and let me know if this is an improvement.
Attached Files
File Type: epub epub3-The Adventures of Sherlock Holmes.epub (683.3 KB, 20 views)

Last edited by DNSB; 04-21-2018 at 12:21 PM. Reason: Fat fingers cause typos...
DNSB is offline   Reply With Quote
Old 04-21-2018, 03:26 PM   #7
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 767
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
1. I went back to the epub2 file, deleted the cover html file, and added it with the [Add Cover] menu

So somehow I must have messed it up -- all I ever do intentionally is use the menu

epub2 --

Code:
<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 306 423" preserveAspectRatio="xMidYMid meet">
      <image width="306" height="423" xlink:href="../cover.jpg"/>
    </svg>
so at least the image is not distorted

2. The image size seems to have changed

After I deleted the cover html, re-added the cover, and upgraded to epub3 the image is much smaller


epub3b --

Code:
    <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 306 423" preserveAspectRatio="xMidYMid meet">
      <image width="306" height="423" xlink:href="../cover.jpg"/>
    </svg>
phossler is offline   Reply With Quote
Old 04-21-2018, 11:32 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,223
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
THe issue is that ADE is deciding to use only a fraction of the available height for the full page height. That is why the image is distorted with preserveAspectRatio=none and small with preserveAspectRatio=xMidyMid meet

But ADE is only doing this for the EPUB 3 file and not the EPUB 2 file. The question is why? That I have no answer for.
kovidgoyal is online now   Reply With Quote
Old 04-22-2018, 01:21 AM   #9
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 44
Karma: 12802
Join Date: Apr 2014
Device: none
Quote:
Originally Posted by phossler View Post
epub3b --

Code:
    <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 306 423" preserveAspectRatio="xMidYMid meet">
      <image width="306" height="423" xlink:href="../cover.jpg"/>
    </svg>
Try this code instead of <svg> and see if it helps:
Code:
<div><img alt="image" style="max-height: 100%; max-width: 100%;" src="../cover.jpg"/></div>
mikapanja is offline   Reply With Quote
Old 04-22-2018, 10:16 AM   #10
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 1,416
Karma: 5435010
Join Date: Jun 2010
Device: Windows 10 tablet,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
phossler:

A couple of links which should be of help to you.

https://www.w3.org/TR/SVG2/linking.html

which is a sub set of:

http://kb.daisy.org/publishing/docs/html/svg.html

which is a sub set of:

http://kb.daisy.org/publishing/

bernie
gbm is offline   Reply With Quote
Old 04-23-2018, 11:17 AM   #11
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 767
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
@ mikapanja & gbm -- thanks for the suggestion and the links

I tend to use the 'what kovid gave me' default for the cover and just use [Add Cover], but I'll keep the idea just in case I do get some odd ball image

I bookmarked the links right next to my w3schools.com link since I like to keep references handy
phossler is offline   Reply With Quote
Old 04-23-2018, 02:01 PM   #12
deback
Book E d i t o r
deback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the end
 
Posts: 279
Karma: 31930
Join Date: May 2015
Device: Laptop
Here's the code I use in the titlepage.xhtml (or the cover HTML file, whatever name was assigned to it) when the image is not the correct size:


<?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;
}
div {
padding: 0;
margin: 0;
}
img {
padding: 0;
margin: 0;
}
</style>
</head>

<body>

<div>

<img src="cover.jpeg" alt="cover" style="height: 100%"/>

</div>

</body>

</html>

Copy and paste all of the codes above and give it a try. Replace "cover.jpeg" with the name of the cover image file.
deback is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
v3.22.1 Upgrade to epub3 phossler Editor 3 04-20-2018 08:15 PM
Forced to upgrade to new ADE? dkperez General Discussions 8 07-29-2017 09:47 PM
epub3 app with epub3 dictionary support Doitsu ePub 0 01-21-2017 09:38 AM
New Errors Converting epub3 -> zip -> epub3 Lola25 ePub 2 11-12-2013 09:37 PM
No cover image in ADE from InDesign wannabee ePub 3 02-25-2011 02:40 AM


All times are GMT -4. The time now is 03:03 AM.


MobileRead.com is a privately owned, operated and funded community.