bell notificationshomepageloginedit profileclubsdmBox

10.01% popularity   0 Reactions

Under Ubuntu 12.04 I converted with Calibre an html source to epub format, but when I read the resulting epub with Calibre I noticed (using the 'inspect' command of Calibre viewer) that images get some additional styling, absent both in original html and in html that epub is made of. For example,

<img src="copertina_retro.jpg" alt="pict" width="100%"/>

in html becomes

<img src="copertina_retro.jpg" alt="pict" width="100%"
style="height: 502px; width: 351.91752577319585px; ">

inside Calibre viewer, when inspecting the image.
This prevents me to make manual modifications to the size of a single image.

How can I avoid such 'restyling'?

Does it happen just with Calibre viewer or it is typical behaviour of ebook readers?


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (1)

Login to follow story

More posts by @Bethany

1 Comments

Sorted by latest first Latest Oldest Best

10% popularity   0 Reactions

Testing this it seems that this is simply a quirk of Calibre's ebook viewer. It adds the absolute calculated size of the image dynamically into the source. This size changes when you resize the window (with the inspector window open it shows continuously). Whether max-width and max-height styles are set by the viewer depends on the viewing mode. In page mode (default) these values are set, they seem to be needed for the calculation. In continuous mode your values will not be overridden.

So this is just a quirk of that specific software. You can't change it, you can't draw any conclusions about the behaviour of other software; e.g. my Sony T2 doesn't set own max-width leading to pictures that are not completely visible. In fact I would prefer the intelligent behaviour of Calibre viewer here. FBReader resizes the image to a smaller size to fit it into the width.

Sizes smaller than 100% or the current pixel width can be used without problems, Calibre does not ignore it in either mode. (Absolute pixel widths are obviously a bad idea in any case.)

You can set the values to your needs. As different applications use different heuristics to produce a readable rendering you should stay as close to a semantic markup as possible to be able to ignore such additional output.


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

 

Back to top