Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-01-2013, 03:55 PM   #16
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,856
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I get why the different image sizes on screen based on the different screen resolutions. But what I don't get is why the images are not centered on the Aura when they are on the 650.

If this is a kepub vs ePub. Then get rid of kepup as it doesn't look as good.
JSWolf is offline   Reply With Quote
Old 05-01-2013, 03:56 PM   #17
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
Thanks. Yes that is much better. I think I understand: I need to use 100% for my svg width and height to get the viewBox to fill the screen rather than using an absolute size; the viewBox and image dimensions need to match the real image file in order to preserve its aspect ratio. The image dimensions need to match the viewBox dimensions to get the image to fill the viewBox, and hence fill the screen.
ShellShock is offline   Reply With Quote
Advert
Old 05-01-2013, 03:59 PM   #18
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
Quote:
Originally Posted by paola View Post
thank you guys: do you have any suggestions for the best measurements to put in the Mini?
As DNSB said, I think the principle is the same for all screen resolutions:

Code:
<div>
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 660 880" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
      <image height="880" width="660" xlink:href="../Images/cover.jpg"></image>
    </svg>
  </div>
Replace the two 660 with the real width of the image, and the two 880 with the real height of the image (Sigil displays the width and height if you open the image).
ShellShock is offline   Reply With Quote
Old 05-01-2013, 04:03 PM   #19
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
Quote:
Originally Posted by ShellShock View Post
Thanks. Yes that is much better. I think I understand: I need to use 100% for my svg width and height to get the viewBox to fill the screen rather than using an absolute size; the viewBox and image dimensions need to match the real image file in order to preserve its aspect ratio. The image dimensions need to match the viewBox dimensions to get the image to fill the viewBox, and hence fill the screen.
Quote:
Originally Posted by ShellShock View Post
snip
Replace the two 660 with the real width of the image, and the two 880 with the real height of the image (Sigil displays the width and height if you open the image).

now I get it, thanks!
paola is offline   Reply With Quote
Old 05-01-2013, 04:14 PM   #20
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: 46,661
Karma: 169712392
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
I get why the different image sizes on screen based on the different screen resolutions. But what I don't get is why the images are not centered on the Aura when they are on the 650.

If this is a kepub vs ePub. Then get rid of kepup as it doesn't look as good.
Not sure if that is a .kepub but on the Kobo using .epubs, the image centering runs into issue with the Adobe code since the common method for centerng images is to set auto margins. Unfortunately, the Adobe code disregards those auto margins. There are workarounds but they are a pain. The Pigs, Gourds and Wikis site had a nice discussion of this problem and some workarounds using the inline-block property.

Regards,
David
DNSB is offline   Reply With Quote
Advert
Old 05-01-2013, 04:21 PM   #21
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: 46,661
Karma: 169712392
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by ShellShock View Post
Thanks. Yes that is much better. I think I understand: I need to use 100% for my svg width and height to get the viewBox to fill the screen rather than using an absolute size; the viewBox and image dimensions need to match the real image file in order to preserve its aspect ratio. The image dimensions need to match the viewBox dimensions to get the image to fill the viewBox, and hence fill the screen.
By Jove, I think he's got it!

Sorry but I couldn't resist that slight misquote of Professor Higgins.

Regards,
David
DNSB is offline   Reply With Quote
Old 05-01-2013, 04:28 PM   #22
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,856
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
Not sure if that is a .kepub but on the Kobo using .epubs, the image centering runs into issue with the Adobe code since the common method for centerng images is to set auto margins. Unfortunately, the Adobe code disregards those auto margins. There are workarounds but they are a pain. The Pigs, Gourds and Wikis site had a nice discussion of this problem and some workarounds using the inline-block property.

Regards,
David
Here is the code in the XML for displaying the image centered followed by the relevant CSS code...

Code:
<p class="image"><img alt="" src="2.jpg"/></p>
Code:
p {
    margin-top: 0;
    margin-bottom: 0;
    text-indent: 1.2em
}
.image {
    display: block;
    text-align: center;
    text-indent: 0
}
There nothing auto. There's no inline anything. There no workarounds. It just works.
JSWolf is offline   Reply With Quote
Old 05-01-2013, 05:56 PM   #23
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
Quote:
Originally Posted by JSWolf View Post
There nothing auto. There's no inline anything. There no workarounds. It just works.
There could be if it's a calibre conversion, as calibre seems to add a css class to everything. I've got the same standard epub loaded on a PRST1, KoboGlo and AuraHD. The chapter heading ornamental jpg is correctly centred on all 3 devices.

The html code looks like:
Code:
<p class="calibre5"><img alt="chap08" src="images/chapter08.jpg" class="calibre2"/></p>
and the relevant css:
Code:
.calibre2 {
    height: auto;
    width: auto
    }
.calibre5 {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    text-align: center
    }
The only difference in the 3 displays is how big the image looks.
In addition, I removed the "calibre2" class and re-tested on the Aura -- still centered correctly.
jackie_w is offline   Reply With Quote
Old 05-01-2013, 06:17 PM   #24
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: 46,661
Karma: 169712392
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
Here is the code in the XML for displaying the image centered followed by the relevant CSS code...

Code:
<p class="image"><img alt="" src="2.jpg"/></p>
Code:
p {
    margin-top: 0;
    margin-bottom: 0;
    text-indent: 1.2em
}
.image {
    display: block;
    text-align: center;
    text-indent: 0
}
There nothing auto. There's no inline anything. There no workarounds. It just works.
Try using that to display a graphics drop cap or any other graphics inline with text, hence my preference for inline-block. I've seen a lot of epubs that try to display centered graphics by using code similar to the following:

Code:
.image  {
display: block;
margin-left: auto;
margin-right: auto;
}
This works until you meet a renderer that does not support the margin: auto directive. For whatever reason, Adobe is in that camp.

Also note the using text-align with graphics is not a recommended technique and should be avoided even though it works at least 95% of the time.

Regards,
David
DNSB is offline   Reply With Quote
Old 05-23-2013, 07:50 AM   #25
ShimSham
Enthusiast
ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.
 
Posts: 34
Karma: 402694
Join Date: May 2013
Location: London, UK
Device: Kobo Aura HD, Kobo Touch
Quote:
Originally Posted by ShellShock View Post
As DNSB said, I think the principle is the same for all screen resolutions:

Code:
<div>
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 660 880" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
      <image height="880" width="660" xlink:href="../Images/cover.jpg"></image>
    </svg>
  </div>
Replace the two 660 with the real width of the image, and the two 880 with the real height of the image (Sigil displays the width and height if you open the image).


Thanks to the info in this thread I have been able to get the maps on my fantasy books to fill up the Aura's screen.

But the images have all been off-centre. How do I make images bigger and centred at the same time? I am a novice and have only just worked out how to use sigil, most of this thread is going over my head, so please be gentle.
ShimSham is offline   Reply With Quote
Old 05-23-2013, 09:48 PM   #26
ShimSham
Enthusiast
ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.ShimSham ought to be getting tired of karma fortunes by now.
 
Posts: 34
Karma: 402694
Join Date: May 2013
Location: London, UK
Device: Kobo Aura HD, Kobo Touch
Ahh!! I discovered I hadn't entered the correct values for height and width in all the places needed. My images/maps now fill the page nicely and are centred. Thanks to everyone for the helpful information in this thread.
ShimSham is offline   Reply With Quote
Old 05-23-2013, 10:20 PM   #27
Arios
A curiosus lector!
Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.Arios ought to be getting tired of karma fortunes by now.
 
Arios's Avatar
 
Posts: 463
Karma: 2015140
Join Date: Jun 2012
Device: Sony PRS-T1, Kobo Touch
Posted by JSWolf
Quote:
Here is the code in the XML for displaying the image centered followed by the relevant CSS code...

Code:

<p class="image"><img alt="" src="2.jpg"/></p>
It's will work better if you put the path, like this: <img alt="" src="../Images/2.jpg"/></p>
Arios is offline   Reply With Quote
Old 05-23-2013, 10:44 PM   #28
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Arios View Post
It's will work better if you put the path, like this: <img alt="" src="../Images/2.jpg"/></p>
Only if the image is in that directory in the epub. It doesn't have to be, and it is common for no subdirectories to be used. And if I see an "Images" and a "Text" subdirectory, I assume someone has used Sigil to edit the epub.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo Graphics, pictures and tables in Epub Elfuente Kobo Reader 1 12-03-2012 06:40 PM
Pictures from PDF to EPub or LRF eugentango Recipes 6 06-12-2012 11:10 PM
zoom in pictures in epub vice-versa Kobo Reader 10 03-21-2012 03:28 PM
why downloaded epub have no thumbnail pictures? FinancialWar Sony Reader 9 12-14-2011 06:56 PM
ePub to MOBI with Pictures Bull06 Calibre 12 07-09-2010 11:00 AM


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


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