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 06-27-2015, 11:44 AM   #1
Patricius
Enthusiast
Patricius has learned how to buy an e-book online
 
Patricius's Avatar
 
Posts: 44
Karma: 86
Join Date: Apr 2015
Location: Taiwan, Taipei
Device: Kobo Aura H2O
Question Size of images in epub/kepub

I've happened to read some books with some inline images (formulas, musical notations, special chars like āēīōū... etc, in jpg or bmp), and their sizes appear to be 'correct' on the calibre viewer.

However, when opened with the nickel viewer of my H2O, the images become tiny and unreadable in some cases. With the special chars I can regex it into corresponding ones, but not with formulas and musical notations. Is this a known problem? Is there a way to make it stretched like in calibre viewer? I'd be grateful if anyone comes up with some suggestions. Thanks!

p.s. I've tried the original epub and converted kepub, the image sizes look the same despite the super large font size with epub.

Here are some examples: the 'Salūte' becomes 'Salūte' ( in which the 'ū' is a bitmap), and the same book opened in calibre & nickel:
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	562
Size:	158.6 KB
ID:	139715   Click image for larger version

Name:	2.jpg
Views:	636
Size:	218.5 KB
ID:	139716  

Last edited by Patricius; 06-27-2015 at 12:09 PM. Reason: add post icon
Patricius is offline   Reply With Quote
Old 06-27-2015, 12:59 PM   #2
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
It is probably because the publisher hasn't specified the size correctly. The size of an image willl be the actual size of the bitmap unless anoher size is specified, although different readers can use other defaults. The publisher should have specified a size in units of em (e.g. 1em) if the bitmap is to be used to replace text characters.

(But really the publisher should not do this at all, as a bitmap is always going to look bad when set next to a scalable glyph. They should really use an embedded font or SVG image instead.)

Edit: If you don't mind editing the book's stylesheet it should be fairly easy to fix, you can probably just change the image size to height:1em;width:auto; for the images that replace text, and height:auto;width:100%; for images that should be scaled to the screen width. But for the bitmaps that replace text it is better to delete the bitmap image altogether and replace it with the actual glyph it is supposed to represent, and then use a font that contains that glyph.

Last edited by GeoffR; 06-27-2015 at 01:22 PM. Reason: ... editing the book's stylesheet ...
GeoffR is offline   Reply With Quote
Advert
Old 06-27-2015, 01:26 PM   #3
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
Are you converting books with Calibre? If so you should set target device to 'tablet' to prevent it from messing with the images.

That sheet music should probably have a width 100% setting or something like it. You'll have to look at the HTML/CSS as to why they're not displayed in full size.
frostschutz is offline   Reply With Quote
Old 06-27-2015, 09:13 PM   #4
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: 40,579
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Patricius View Post
I've happened to read some books with some inline images (formulas, musical notations, special chars like āēīōū... etc, in jpg or bmp), and their sizes appear to be 'correct' on the calibre viewer.

However, when opened with the nickel viewer of my H2O, the images become tiny and unreadable in some cases. With the special chars I can regex it into corresponding ones, but not with formulas and musical notations. Is this a known problem? Is there a way to make it stretched like in calibre viewer? I'd be grateful if anyone comes up with some suggestions. Thanks!

p.s. I've tried the original epub and converted kepub, the image sizes look the same despite the super large font size with epub.
Very often, publishers specify the size of images in terms of pixels ( width: 355px;, height: 255px; ) or don't bother to specify any size which seems to default to the pixel size. A 600x800 image would fill the screen on a Kobo Touch but on the HD/H20 would fill about 60% of the screen width/height leaving a lot of blank space.

Specifying the dimensions in relative terms or using an SVG wrapper get around these issues. Replacing the width and height for example above with width: 59%;, height: auto; would have the image occupying the same amount of screen area on any device regardless of it's screen resolution.

The example used is from one ebook I recently read where all the image sizes were specified in pixels. The example I used was for the chapter title images was orignally:

Code:
.chaptitl {
    height: 225px;
    width: 355px
    }
which I changed to:


Code:
.chaptitl {
    height: auto;
    width: 59%;
    }
I calculate the percentages based on a 600x800 screen which seems to be the common value used by most publishers so 355/600 is ~59%. This looks a lot better than 355/1080 which used about 32% of the screen width when viewed on my Aura H2O.

As for the glyphs, my personal opinion is using bitmaps for glyphs should only be done when there is no other way to supply the glyph. Even embedding a subsetted font looks better and takes little extra effort. My personal preference is using either Charis SIL or Deja Vu which have decent glyph selections and look good on an eInk screen so I don't need to concern myself with whether macrons, breves, carons, etc. will or will not display.

Last edited by DNSB; 06-27-2015 at 09:23 PM. Reason: fat fingered typos... what else is old?
DNSB is offline   Reply With Quote
Old 06-28-2015, 02:17 AM   #5
Patricius
Enthusiast
Patricius has learned how to buy an e-book online
 
Patricius's Avatar
 
Posts: 44
Karma: 86
Join Date: Apr 2015
Location: Taiwan, Taipei
Device: Kobo Aura H2O
Thanks everyone! I just replaced *bmp with corresponding glyphs and stretched the images using css style [ width: 100%; height: auto. ].

This can be done easily unless the epub is ill-formed. However, for the epubs converted by calibre, every images seem to have their own classes .calibre_%d, which makes it harder to adjust image size by group.
Is There an option which stops calibre from doing this?
Patricius is offline   Reply With Quote
Advert
Old 06-28-2015, 06:26 PM   #6
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by Patricius View Post
However, for the epubs converted by calibre, every images seem to have their own classes .calibre_%d, which makes it harder to adjust image size by group.
Is There an option which stops calibre from doing this?
I think that is part of the CSS 'flattening' that Calibre does whenever it converts/creates an epub, it can cause other problems too such as preventing line spacing and other adjustment sliders working. Unfortunately there is no option to turn it off.

If you are going to load the books as kepubs then you might be able to make use of the !important modifier: The KEPUB and EPUB readers treat !important differently, in kepubs something like img {width:100% !important;} will override the width property of all subclasses of img, whereas in epubs it seems only to override img itself.

Last edited by GeoffR; 06-28-2015 at 06:28 PM. Reason: spelling
GeoffR is offline   Reply With Quote
Old 01-20-2019, 10:29 PM   #7
codychan
Groupie
codychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud of
 
codychan's Avatar
 
Posts: 153
Karma: 27950
Join Date: Nov 2018
Device: Kobo Aura One, Kobo Forma
Is this can be automatically done in patch or Calibre setting/plugin, I mean, make the image 100% width or height (depending on the image) of my kobo device?

I found that a lot of my epub files contain images, and the width of the images is usually only half the width of my Kobo device (kobo aura one and kobo forma), I know I can touble-tap the image to zoom in, but it is still quite annoying.
codychan is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Images don't keep size (html to EPUB) zoomiest Conversion 2 11-05-2014 03:21 PM
Aura HD Diferent font size in epub and kepub ersott Kobo Reader 24 04-15-2014 08:03 AM
kepub images tharael89 Conversion 10 08-14-2013 06:28 AM
What is the right size for images in epub? Kasper Hviid ePub 4 06-03-2013 03:07 PM
Why the size difference between kepub & epub. Nascarfan1972 Kobo Reader 3 12-28-2012 09:18 PM


All times are GMT -4. The time now is 11:30 PM.


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