06-27-2015, 11:44 AM | #1 |
Enthusiast
Posts: 44
Karma: 86
Join Date: Apr 2015
Location: Taiwan, Taipei
Device: Kobo Aura H2O
|
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: Last edited by Patricius; 06-27-2015 at 12:09 PM. Reason: add post icon |
06-27-2015, 12:59 PM | #2 |
Wizard
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 ... |
Advert | |
|
06-27-2015, 01:26 PM | #3 |
Linux User
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. |
06-27-2015, 09:13 PM | #4 | |
Bibliophagist
Posts: 40,579
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
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 } Code:
.chaptitl { height: auto; width: 59%; } 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? |
|
06-28-2015, 02:17 AM | #5 |
Enthusiast
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? |
Advert | |
|
06-28-2015, 06:26 PM | #6 | |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
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 |
|
01-20-2019, 10:29 PM | #7 |
Groupie
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. |
|
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 |