09-29-2020, 10:15 AM | #1 |
Connoisseur
Posts: 51
Karma: 10
Join Date: Mar 2014
Device: iPhone XR
|
Image aspect ratio
Hi, sorry if this is an old topic, but I just encountered it.
I have a book that had some images which were incorrectly being displayed sideways (rotated 90 degrees counterclockwise). So I exported the images, rotated them clockwise, and then replaced the images in the book. Correctly displayed, the images were now wider than they were high. When displayed in the book viewer, they were stretched out vertically and looked awful. I noticed that they were displayed with an "img" tag using the property "class=calibre12". In stylesheet.css calibre12 looks like this: .calibre12 { height: 90% width: auto } I had no idea what this meant, but I created a similar property for my redone images using "height: 50%", and they looked a lot better. Can anyone explain this "height" thing, and how to determine the correct value for an image? Thanks. |
09-29-2020, 12:42 PM | #2 |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Not answering your primary question:
The Calibre Editor ('T') has some basic Image tools. Select (view) the image: Now the edit window will show Image type tools. There you can Rotate, Resize or apply Image Filters(effects) BTW not all devices honor 'Auto' |
09-29-2020, 01:10 PM | #3 |
Connoisseur
Posts: 51
Karma: 10
Join Date: Mar 2014
Device: iPhone XR
|
Thank you, that's good to know. I completely missed the editor tools the first time around.
But (not to seem ungrateful) they would not have helped my basic problem of stretching out the image in the viewer. |
09-29-2020, 01:24 PM | #4 | |
Bibliophagist
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
.calibre12 { width: 90%; height: auto; } Note the semi-colon after the entries is required for all but the last entry before the } but I use it on all entries since it doesn't hurt and helps to keep you from having issues when moving items around. |
|
09-29-2020, 05:56 PM | #5 |
Connoisseur
Posts: 51
Karma: 10
Join Date: Mar 2014
Device: iPhone XR
|
Thanks, I'll give that a try. I obviously don't know what I'm doing with this CSS stuff, so I'm groping for a lifeline.
|
09-29-2020, 06:36 PM | #6 | |
Guru
Posts: 760
Karma: 2090886
Join Date: May 2019
Device: Kindle Oasis 1st Gen
|
Quote:
Getting thrown in the deep end really makes you paddle |
|
09-29-2020, 07:27 PM | #7 |
Connoisseur
Posts: 51
Karma: 10
Join Date: Mar 2014
Device: iPhone XR
|
Yeah, I don't know beans about HTML or CSS, but I dove into the calibre editor and figured out most of what I wanted to do with it. Fortune favors the bold!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PDF Aspect Ratio | Bookchin | 7 | 08-01-2019 09:33 AM | |
image aspect ratio: where to add argument? | dsfgxnchjb | Conversion | 4 | 10-10-2014 01:42 PM |
Aspect Ratio for Covers? | Buddy13 | Kobo Reader | 10 | 10-21-2011 07:45 AM |
4:3 vs 16:9 aspect ratio - what's your preference? | Wetdogeared | General Discussions | 59 | 02-17-2011 10:48 AM |
Cover image aspect ratio for mobi | Evildad | Conversion | 4 | 01-27-2011 10:29 PM |