Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-08-2021, 05:00 AM   #1
kanomeguri
Junior Member
kanomeguri began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2021
Device: pc
How to rotate picture in epub?

I read some comics in calibre, and some picture are upright, so i add 'transform:rotate(90deg);' in body style.
Whether have plugins that could achieve this function?
It would be better if view can be restored when i scroll to next page.
kanomeguri is offline   Reply With Quote
Old 02-08-2021, 05:18 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the edit book tool and actually rotate the pictures. There are no plugins for the viewer, it doesnt have a plugin framework.
kovidgoyal is offline   Reply With Quote
Advert
Old 02-10-2021, 07:56 AM   #3
kanomeguri
Junior Member
kanomeguri began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2021
Device: pc
Quote:
Originally Posted by kovidgoyal View Post
Use the edit book tool and actually rotate the pictures. There are no plugins for the viewer, it doesnt have a plugin framework.
thanks for your reply
kanomeguri is offline   Reply With Quote
Old 04-06-2025, 09:58 AM   #4
julo
Connoisseur
julo began at the beginning.
 
Posts: 67
Karma: 12
Join Date: Apr 2010
Location: Pittsburgh area
Device: prs-505,900,T2
Two things:
1) It would be nice if multiple images could be selected and rotated in bulk.
2) It doesn't work too well if pictures are NOT square. Say a portrait image but laying on side: after rotation it is a landscape frame but with a messed up portrait with wrong aspect inside the landscape frame.
I have inherited an ePub file with 100+ photos with approx. 80% turned counter-clock wise 90deg. Is there an easy way to fix it?

Last edited by julo; 04-06-2025 at 10:30 AM.
julo is offline   Reply With Quote
Old 04-06-2025, 12:30 PM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 78,936
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by julo View Post
Two things:
1) It would be nice if multiple images could be selected and rotated in bulk.
2) It doesn't work too well if pictures are NOT square. Say a portrait image but laying on side: after rotation it is a landscape frame but with a messed up portrait with wrong aspect inside the landscape frame.
I have inherited an ePub file with 100+ photos with approx. 80% turned counter-clock wise 90deg. Is there an easy way to fix it?
You can rotate using the editor but only one-at-a-time.
JSWolf is offline   Reply With Quote
Advert
Old 04-07-2025, 09:18 AM   #6
julo
Connoisseur
julo began at the beginning.
 
Posts: 67
Karma: 12
Join Date: Apr 2010
Location: Pittsburgh area
Device: prs-505,900,T2
I did all of them but one at a time. My problem is that the "frame" in the epub did not rotate . Just the photo rotated in the frame. So I ended up with e.g. a portrait photo adjusted/filled into a LS "frame".
BTW the images rotated just fine in the "images in book" viewer. They are wrong in the epub pages.
julo is offline   Reply With Quote
Old 04-07-2025, 10:13 AM   #7
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: 30,880
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by julo View Post
I did all of them but one at a time. My problem is that the "frame" in the epub did not rotate . Just the photo rotated in the frame. So I ended up with e.g. a portrait photo adjusted/filled into a LS "frame".
BTW the images rotated just fine in the "images in book" viewer. They are wrong in the epub pages.
??? The viewer IS the EPUB view.

Frame?
Is this a simple HTML box model "border"? You changed the geometry of the image, but not the 'box' (H & W if set) dimensions in the CSS.
Or
Is this an artwork in itself (image) with the second image overlaid?
(This gets real tricky, since everything there needs to be absolute so one item does not move or resize different from the other. Simple way is to Pre-frame (externally) and use that image.
theducks is online now   Reply With Quote
Old 04-09-2025, 01:31 PM   #8
julo
Connoisseur
julo began at the beginning.
 
Posts: 67
Karma: 12
Join Date: Apr 2010
Location: Pittsburgh area
Device: prs-505,900,T2
I don't know the correct technical terms. In a nut shell:
The original is a docx file. It has many photos like head0.
Converted to epub many, not all, photos are rotated to look like head1.
Reversing the rotation with Epub Edit the photos look like head2.

I tried many ways but in the end I am going to convert to pdf which seem to work.
Attached Images
   
julo is offline   Reply With Quote
Old 04-09-2025, 01:59 PM   #9
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: 44,475
Karma: 167912649
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
You not only need to rotate the image, you need to rotate the sizing. Say you have an image which is 1000px x 1500px and the class used for the image in the stylesheet and using your second image) is something like:
Code:
author_pic {
width: 300px;
height: 200px;
}
When the image was rotated, you would need to change that code to something like:
Code:
author_pic {
width: 200px;
height: 300px;
}
Personally, I would use a % for the sizing so something like:
Code:
author_pic {
width: 40%;
height: auto;
}
You may also find this done in inline code so instead of something like:
Code:
<img alt="Stratofortress" class="imagew_50" src="../Images/image00344.jpeg"/>
you would see this:
Code:
<img height="163" alt="Stratofortress" src="../Images/image00144.jpeg" width="325"/>
DNSB is offline   Reply With Quote
Old 04-09-2025, 01:59 PM   #10
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: 30,880
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by julo View Post
I don't know the correct technical terms. In a nut shell:
The original is a docx file. It has many photos like head0.
Converted to epub many, not all, photos are rotated to look like head1.
Reversing the rotation with Epub Edit the photos look like head2.

I tried many ways but in the end I am going to convert to pdf which seem to work.
View just the image (double click the image filename in the editors file browser.
Does it look normal?
If Yes. then the CSS Height and width values are now wrong (happens when you rotate the image, but the values remained . either swap the values (needed if you use the CSS to force a resize), switch the value to 'auto' I usually set the width, the set height to auto. YMMV
theducks is online now   Reply With Quote
Old 04-09-2025, 05:23 PM   #11
julo
Connoisseur
julo began at the beginning.
 
Posts: 67
Karma: 12
Join Date: Apr 2010
Location: Pittsburgh area
Device: prs-505,900,T2
Quote:
Originally Posted by theducks View Post
View just the image (double click the image filename in the editors file browser.
Does it look normal?
If Yes. then the CSS Height and width values are now wrong (happens when you rotate the image, but the values remained . either swap the values (needed if you use the CSS to force a resize), switch the value to 'auto' I usually set the width, the set height to auto. YMMV
I ran a couple tests to satisfy my curiosity. And for information each photo has its own block the way it looks.
In one test I just deleted all blocks. The photos showed OK as expected but too big.
In the second text I used a text editor and flipped all height and width in the stylesheet.
That would have been an option but there are 100 or so photos and not all are rotated the same way. It just is not feasible if making a pdf solves my problem.

Now if Edit Book had an option where you could also flip height/width when rotating a picture...
julo is offline   Reply With Quote
Old 04-09-2025, 05:36 PM   #12
julo
Connoisseur
julo began at the beginning.
 
Posts: 67
Karma: 12
Join Date: Apr 2010
Location: Pittsburgh area
Device: prs-505,900,T2
And the other thing is when making epubs: if I use Calibre's ebook-convert it results in one kind of stylesheet, if I use OpenOfficeWriter it results in another kind of stylesheet. Rotated in both cases. Additionally Calibre's convert has seemingly inconsistent reductions???
Like I said pdf seems to be less hassle.
julo is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to rotate text in an ePub? fredih ePub 29 08-27-2018 04:58 PM
Can i rotate text and insert images in Mobi and EPUB? JanGLi Kindle Formats 5 02-02-2013 04:16 PM
Background picture in epub? Montyp535 ePub 1 11-15-2011 12:28 PM
360 PB 360 rotate in picture viewer? franklekens PocketBook 0 07-17-2011 04:49 AM
Use the first Picture in an epub as cover? flowoeB Library Management 1 05-14-2011 09:58 AM


All times are GMT -4. The time now is 01:08 PM.


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