![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Sep 2018
Device: PC
|
Calibre images stretch vertically
![]() Calibre for Windows [epub]: Narrowing width of window makes images stretch vertically. How can I maintain image's aspect ratio? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The viewer will simply use whatever aspect ratio setting is int he file it is vieweing. So if you dont want the images stretched do a conversion to EPUB enabling the option in the epub output section of the conversion dialog to preserve cover ratio
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 42
Karma: 10
Join Date: Aug 2015
Device: pc
|
I'm feeling pretty stupid about now. It took me a ridiculously long time to figure out that the Preserve Aspect Ratio option was only available in Preferences>Conversion:Output Options
I kept trying to find it in right-click>Convert Books>Convert Individually or Bulk Convert Maybe the individual/bulk conversion menu could have a shortcut to the Preferences, or some notation that indicates how the main Preferences have been set? Sort of a "hey, these things are over there if that's what you're wanting to change" Maybe like the hints that "float" on mouseover? I don't know the best way, I just know that I've been avoiding epub format for a long time because I couldn't figure it out, and I hate badgering people who give me nifty software for free. (and it is awesome - Calibre is lightyears ahead of Adobe Digital Editions and Amazon's Kindle-for-PC and pretty much all the Android apps - thank you again!) The first time I tried to convert epub to epub, it told me there was already an epub and asked me if I really wanted to do that. Now that I've set the Preserve Aspect Ratio in Preferences, I tried epub to epub, but it creates another file and marks one of them an unknown format. Apparently I need to convert to an intermediary format and then back to epub. LRF seems to work, but is there a particular format that is best for preserving the original image ratios before/during conversion back to epub? Other threads make it clear that some formats don't have the option to preserve aspect ratio. I don't understand enough about the formats to really figure out the best way to do this. Whenever possible, I've been using plain HTML in my browser. I read primarily on my laptop, which is widescreen, so this and the trouble I have with continuous scrolling (ie, it is continuous only within the chapter, and snaps to the start of the next chapter when the bottom of the page is the end of a chapter) are my main issues with epub format. (Well, that and the graphic novel publishers who bunch up page images in epub when I'd rather just open the uncompressed image folder in Irfanview where I can use the keyboard to zoom/advance, but that's another thing entirely.) |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
do an epub to epub conversion the original epub becomes a file with the extension file.original_epub so you can restore it if the conversion did something you dont like.
|
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 42
Karma: 10
Join Date: Aug 2015
Device: pc
|
That doesn't seem to be how it works when I do it?
If I convert epub to epub, it does create another file and label the old with .original_epub, but the new one still has the same stretching issue. If I start from a pre-existing LRF and convert to epub, it still has the stretching issue. If I convert from epub to LRF, remove the epub, and convert the new LRF to epub, it fixes it. I have no idea why, but it seems to be consistent. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Make sure you are setting the correct option in the conversion dialog when you are converting and you should be fine. If not, then open a bug report and attach one of these epub files, and I will take a look.
|
![]() |
![]() |
![]() |
#7 |
Zealot
![]() Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
|
Can just I ask: does this instruction apply just to the cover, or to all of the images in the book globally?
|
![]() |
![]() |
![]() |
#8 |
Zealot
![]() Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
|
It's just that, in your initial response, you refer to "images" (plural), but then later say "preserve cover ratio".
|
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The options name is "Preserve cover aspect ratio" should be pretty self explanatory.
|
![]() |
![]() |
![]() |
#10 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,512
Karma: 167912829
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
As the checkbox say, Preserve cover aspect ratio. For images in the book, you might want to try setting width=xx%; and height=auto; in the CSS.
|
![]() |
![]() |
![]() |
#11 | |
Zealot
![]() Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
|
Quote:
Also, is there any way of adding a global instruction to an epub file that will apply the setting to all images? |
|
![]() |
![]() |
![]() |
#12 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,512
Karma: 167912829
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
You could try adding: Code:
img { height: auto !important; } The width percentage depends on the image. I generally go generic and use values such as 95% for near full page width images, 50%/33% for most images within the ebook such as author headshots and 20% for scene separator images. A lot of that comes down to personal preferences. One friend of mine tends to divide the image width in pixels by 6 and use that as the % which makes his images vary more in size. the 6 comes from his old ereader which had a 600x800 screen so dividing the pixels by 6 gave him the percentage of screen width. |
|
![]() |
![]() |
![]() |
#13 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,882
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Auto to me is do the other part.
It does not mean preserve. I specify width and TAKE what auto gives me for height. But that is for full page images. Ya gotta help with small images or you might get biggun's |
![]() |
![]() |
![]() |
#14 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,512
Karma: 167912829
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
If I have images that are vertically oriented, I might go with width: auto; and set the height by percentage. Or I might go for the full sextet of height, max-height, min-height, width, max-width and min-width. And then there was one abomination where the author used JavaScript so you had image/box sizes that were theoretically sized to the screen dimensions. That was a total CF of an ePub partly due the author not being very familiar with JS and copy/pasting a lot of the code from the web. They were very unhappy when I simplified the code to make the use of JS unnecessary despite the fact that his original ePub caused KDP to generate enough error messages to make them useless for troubleshooting. Evidently, they read somewhere that their ebook would work everywhere because everything supports JS. |
|
![]() |
![]() |
![]() |
#15 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,647
Karma: 103503445
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
![]() Most physical ereaders and many apps don't. There are even web browsers that don't support JS. Also not all JS makes sense in a ebook even if JS does work. But you know all this ![]() I do preview on a 4.3″ android and 5″ and 4.7″ eink as well as big screens, in mobi, azw3 and epub. I may stop checking mobi. Only four very ancient Kindles don't support azw3/KF8 and anyone with a non-Kindle only doing mobi (some old phones & PDAs?) likely has Calibre by now, or buying a new ereader. Width or height for auto mostly works. An oddity is that on some Kobo FW if an image is specified in pt (using px or % is better), the image does scale with user font selection. 12pt ought to be 1em. 12pt might be 16 px, when at default size. None of that applies to paper and may not apply to browsers. Also 1 px is a logical pixel. It might not be one screen dot. Last edited by Quoth; 05-10-2024 at 08:52 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Stretch the cover to fit the screen? | ZodWallop | Kobo Reader | 24 | 04-21-2025 03:35 AM |
How to align/stretch images in the ebook | knowledgecrawler | Recipes | 1 | 08-24-2014 01:04 PM |
Do Kindle covers stretch to fit? | Stodder | Kindle Formats | 4 | 01-22-2014 04:35 AM |
Hello I am not a expert by any stretch | kbdbloak | Introduce Yourself | 4 | 05-27-2011 09:12 AM |
Images flipped vertically when converting from PDF | kataleen | Calibre | 1 | 12-16-2010 02:26 AM |