Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 09-29-2020, 10:15 AM   #1
dan2the6th
Connoisseur
dan2the6th began at the beginning.
 
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.
dan2the6th is offline   Reply With Quote
Old 09-29-2020, 12:42 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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'
theducks is offline   Reply With Quote
Old 09-29-2020, 01:10 PM   #3
dan2the6th
Connoisseur
dan2the6th began at the beginning.
 
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.
dan2the6th is offline   Reply With Quote
Old 09-29-2020, 01:24 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
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:
Originally Posted by dan2the6th View Post
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.
Since you rotated the image, I would have suggested changing your CSS to:

.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.
DNSB is offline   Reply With Quote
Old 09-29-2020, 05:56 PM   #5
dan2the6th
Connoisseur
dan2the6th began at the beginning.
 
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.
dan2the6th is offline   Reply With Quote
Old 09-29-2020, 06:36 PM   #6
Bookstooge
Guru
Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.
 
Bookstooge's Avatar
 
Posts: 760
Karma: 2090886
Join Date: May 2019
Device: Kindle Oasis 1st Gen
Quote:
Originally Posted by dan2the6th View Post
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.
I hate to say it, but this is probably the best way to learn the little bit you'll need. You won't forget it, that is for sure!

Getting thrown in the deep end really makes you paddle
Bookstooge is offline   Reply With Quote
Old 09-29-2020, 07:27 PM   #7
dan2the6th
Connoisseur
dan2the6th began at the beginning.
 
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!
dan2the6th is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF Aspect Ratio Bookchin PDF 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


All times are GMT -4. The time now is 09:59 AM.


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