
: How to avoid ebook image distortion I'm experimenting with Calibre. I have a Word document, with several JPEG images inserted, each of them 537px wide. I exported the document as html, zipped
I'm experimenting with Calibre. I have a Word document, with several JPEG images inserted, each of them 537px wide. I exported the document as html, zipped everything and re-opened in Calibre.
After conversion, in the Calibre reader the images are squashed horizontally.
Is there anyway to have them scale proportionally?
Also, the cover - a PNG - does not scale proportionally (e.g. when the TOC is opened, it squashes horizontally too).
thanks
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @Angela

: How do I add an ISBN to Calibre ebook? According to the Calibre website: Click the book you want to edit and then click the Edit metadata button or press the E key. A dialog opens that
2 Comments
Sorted by latest first Latest Oldest Best
An alternative answer to Tom's proposition to modify CSS:
I didn't want to manually change the HTML/CSS files. I have an original LaTeX file, that I convert into HTML/CSS using htlatex my_file.tex and then I convert it into mobi using Calibre. My images were distorted too.
One solution to keep all the process automatic is to decrease the size of the original pictures, e.g., using convert my_pic.png -resize x500 my_pic.png. It works for me.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
This sounds like a problem with the CSS that Calibre is generating for the epub file. Without seeing the code, it's impossible to say for sure, but my guess is that it's got the width and height for images both set to 100%, which would distort the images in the way you're describing. The answer is to simply remove the height declaration, which will make the images full width of whatever height is appropriate given their aspect ratio.
I don't use Calire, so I can't tell you how to use that tool to do this, but if you're comfortable editing HTML and CSS, all you'll need to do is crack open the epub file (rename it from .epub to .zip, then unzip it), find the images being affected in the HTML, figure out which selectors the CSS is targeting them with, and go change the relevant CSS declarations.
Free books android app tbrJar TBR JAR Read Free books online gutenberg