Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-23-2016, 03:15 PM   #1
Chris Jones
Addict
Chris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five words
 
Posts: 242
Karma: 37089
Join Date: Oct 2012
Device: none
Scaling images in illustrated epubs

Images in epubs do not seem to scale in order to take into account the specs of the e-reading device and as a result a given epub's images may appear reasonably sized on one device and much smaller on another.

One particular example where this is causing me a problem is the LaTeX Companion from Addison-Wesley Professional: there are many diagrams and code samples packaged as jpeg files that are legible in the Calibre ebook-viewer on my laptop but turn out to be totally undecipherable on higher resolution screens such as the Kobo Glo or the Nexus 7 Android tablet making the book useless on such devices.

I looked at a number of illustrated novels from the mobileread site and they all appear to do the same in this respect: on higher resolution devices (I'm guessing this is what is causing the problem...?) some of the images are about the size of a postage stamp to the point that with some of them you cannot even tell at a glance what they're supposed to represent...!

Isn't there a way to work around this issue and to make images the same size relative to the size of the screen on any device?

What I have in mind in a rather vague way is something like specifying that the image is to be displayed in a box/container that occupies a given percentage of the screen and scaled to fit into that box.

Not intrinsically different from the way book covers are handled and this appears to work on all kinds of devices.

Would anyone know how the designers of the epub standard recommend this should be addressed and where it is documented?
Chris Jones is offline   Reply With Quote
Old 02-23-2016, 04:28 PM   #2
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,750
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Yes, you can specify a specific percent of of the screen to be used. But, the problem is usually that the images are usually of too low a resolution.
JSWolf is offline   Reply With Quote
Advert
Old 02-23-2016, 07:10 PM   #3
Chris Jones
Addict
Chris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five words
 
Posts: 242
Karma: 37089
Join Date: Oct 2012
Device: none
Quote:
Originally Posted by JSWolf View Post
Yes, you can specify a specific percent of of the screen to be used. But, the problem is usually that the images are usually of too low a resolution.
Sounds like what I am looking for.

Have you come across an epub that does this that I could use as an example?

Most of the code snippets I have checked in the LaTeX manual are about 800-900 px wide so the resolution should be sufficient if not perfect... After all they are perfectly readable on a PC screen... if not of retina quality.

Once I have a working sample that does what I have in mind I should be able to find some way to fix that book...
Chris Jones is offline   Reply With Quote
Old 02-24-2016, 05:03 AM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Some day ebook reader developers will understand that we need an user-adjustable "resolution" setting, that would change the size of images (if they don't have their size specified in some other way), just like we change the default font size.
Jellby is offline   Reply With Quote
Old 02-24-2016, 06:00 AM   #5
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,750
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You specify a % of the screen. But the problem is that if the images are of low resolution (like I think then when you do get them large enough for a high resolution screen such as a Glo HD or PW3, then you'll see the images looking blurry.
JSWolf is offline   Reply With Quote
Advert
Old 02-24-2016, 08:02 AM   #6
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
That depends on the resize algorithm being used, and on the factor. They could look pixelated instead of blurry, but it shouldn't be much worse than when displayed in a low-resolution device.

A 900px image in a 150ppi screen should look exactly the same when displayed at a 2x magnification in a 300ppi screen, same size, same quality. So nothing is lost by just enlarging all images to double size (in this case), but nothing is gained either, the images won't look "better" than in the low resolution screen.

If the magnification factor is not an integer, or if some interpolation algorithm is used for the resizing, then it can be blurry.
Jellby is offline   Reply With Quote
Old 02-24-2016, 01:25 PM   #7
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 Chris Jones View Post
Not intrinsically different from the way book covers are handled and this appears to work on all kinds of devices.
As you have observed, most publishers manage to scale the cover image to suit the screen size. Exactly the same technique can be used for any other image in the book, so why so many fail to do it for images oher than the cover baffles me.

The problem of publishers using absurdly low-quality bitmap images to begin with is another matter, but there is no point worrying about the effects of rescaling a low-quality image when the unscaled image is too small to see properly anyway.

It is possible to set upper and lower bounds on the image size as a percentage of the screen size, so that the image will only be rescaled if it falls outside those bounds. That way there is nothing to lose by allowing the image to be rescaled, as it will only happen on devices where it needs to be rescaled to fit those bounds.

This is not quite what you were talking about, but attached is an example I made that scales a bitmap image proportional to the font size selected by the reader, but with a bound so that it doesn't become too big to fit on the screen if the font size is set very high.

Edit: I am feeling a bit cynical now, because looking through my books in calibre the only case I can find where a publisher has done a proper job of scaling an image other than the cover is an image for an in-book advertisment.

Edit2: Okay I found this example from Subterranean Press where some of the non-cover images have been scaled properly to suit devices with different screen resolutions.
Attached Files
File Type: epub EquationExample.epub (4.7 KB, 478 views)

Last edited by GeoffR; 02-24-2016 at 03:14 PM. Reason: Found a rare example of a publisher that does it properly.
GeoffR is offline   Reply With Quote
Old 03-08-2016, 04:50 AM   #8
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
This is not so simple: too big images could be a problem in slow ereaders (my old cybook freezes if the images are >400k); too low quality images show artifacts on HD ppi screen... the only way to have perfect images ever could be SVG format, but the SVG support is not so good (and oblivious not all the images could be SVG).

Anyway, the right way to handle images, is put the image in a parent (like a div, ora a span for inline images), give to the parent the width in % we need and give to the child image width 100%.
fbrzvnrnd is offline   Reply With Quote
Old 03-29-2016, 11:30 AM   #9
Chris Jones
Addict
Chris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five words
 
Posts: 242
Karma: 37089
Join Date: Oct 2012
Device: none
Scaling images in illustrated epubs

Interesting workaround... I whipped up an illustrated epub along these lines and it looks like the recommended solution is both easy to implement and free of any adverse effects. Attaching sample file to this message.

The main problem I ran into is that illustrated e-books quickly grow in size. Though only a paltry 200k on average to begin with I still had to reduce the size of my images just to be able to upload the file to this site. The original .epub is over 30M and the limit is 20M. Of course this is not directly related to your solution. Anyway... if you're interested let me me know via PM and I'll (try to) return the original epub with the full-size pics. The difference in quality is quite visible.

As to the LaTeX manual I mention in my original post it turns out that the FBReader application lets you display images full screen at their native resolution just by long-pressing them. Once the image is displayed full-screen you can proceed to pinch the display at your heart's content in order to zoom in and out if so inclined. FBReader would appear to be the only android app that tries to handle images intelligently.

Thanks,

CJ
Chris Jones is offline   Reply With Quote
Old 03-30-2016, 10:24 AM   #10
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by Chris Jones View Post
As to the LaTeX manual I mention in my original post it turns out that the FBReader application lets you display images full screen at their native resolution just by long-pressing them. Once the image is displayed full-screen you can proceed to pinch the display at your heart's content in order to zoom in and out if so inclined. FBReader would appear to be the only android app that tries to handle images intelligently.
The Kindle App does the same (as do eInk Kindles, too), should you decide to convert your book from ePub to KF8 format.
HarryT is offline   Reply With Quote
Old 03-30-2016, 01:57 PM   #11
Chris Jones
Addict
Chris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five words
 
Posts: 242
Karma: 37089
Join Date: Oct 2012
Device: none
I converted the .epub to .mobi and had a look. The main issue here is that amazon/kindle make it a bit of a hassle to read books sideloaded to your device... eventually managed to figure out where I needed to copy the downloaded .mobi file so the kindle app can find it and it works as advertised.

Thanks,

CJ

Last edited by Chris Jones; 03-30-2016 at 03:04 PM.
Chris Jones is offline   Reply With Quote
Old 03-30-2016, 06:12 PM   #12
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,750
Karma: 145864619
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 Chris Jones View Post
I converted the .epub to .mobi and had a look. The main issue here is that amazon/kindle make it a bit of a hassle to read books sideloaded to your device... eventually managed to figure out where I needed to copy the downloaded .mobi file so the kindle app can find it and it works as advertised.

Thanks,

CJ
If you use Calibre, it is easier than trivial to side load to many different devices.
JSWolf is offline   Reply With Quote
Old 03-30-2016, 10:55 PM   #13
Chris Jones
Addict
Chris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five wordsChris Jones can name that ebook in five words
 
Posts: 242
Karma: 37089
Join Date: Oct 2012
Device: none
A trivial... PITA if you ask me mate... :)

To clarify... With the kindle app... I have to fire up a browser... point it to my Calibre server... download the file... fire up a file manager or a terminal... copy the file to the kindle folder... if I can remember where the file was downloaded and the name of the goddam kindle folder and where it lives in the file system, that is... and then go back to the Kindle app to start reading it. With FBReader I only have to open the network menu... select the Calibre server & download the book.. then wait till it's downloaded & tap "Read downloaded copy"... all without ever leaving the FBReader app.
Chris Jones is offline   Reply With Quote
Old 04-02-2016, 10:15 AM   #14
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
There's a lot to be said for dropping any preconceived ideas of page layout and making any graphic that's worth looking at a full-page image, with dimensions in the 1000 pixel range.
exaltedwombat is offline   Reply With Quote
Old 04-02-2016, 01:10 PM   #15
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Quote:
Originally Posted by exaltedwombat View Post
There's a lot to be said for dropping any preconceived ideas of page layout and making any graphic that's worth looking at a full-page image, with dimensions in the 1000 pixel range.
sorry?
fbrzvnrnd is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
scaling images for Kindle on iOS AlanHK Kindle Formats 6 02-03-2016 06:52 AM
Scaling images with SVG wrapper Pablo ePub 4 07-07-2015 01:44 PM
PRS-T1 Scaling Images in epubs mochaiso Sony Reader 4 06-08-2012 12:33 AM
problem scaling images paola ePub 11 05-12-2011 02:20 AM
A bug with images in epubs? Cyclops ePub 2 09-13-2010 10:57 AM


All times are GMT -4. The time now is 09:40 PM.


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