![]() |
#1 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Feb 2021
Device: pc
|
|
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() 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. |
![]() |
![]() |
![]() |
#5 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() 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. |
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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. |
|
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() 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. |
![]() |
![]() |
![]() |
#9 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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; } Code:
author_pic { width: 200px; height: 300px; } Code:
author_pic { width: 40%; height: auto; } Code:
<img alt="Stratofortress" class="imagew_50" src="../Images/image00344.jpeg"/> Code:
<img height="163" alt="Stratofortress" src="../Images/image00144.jpeg" width="325"/> |
![]() |
![]() |
![]() |
#10 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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 |
|
![]() |
![]() |
![]() |
#11 | |
Connoisseur
![]() Posts: 67
Karma: 12
Join Date: Apr 2010
Location: Pittsburgh area
Device: prs-505,900,T2
|
Quote:
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... |
|
![]() |
![]() |
![]() |
#12 |
Connoisseur
![]() 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. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |