![]() |
#16 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 839
Karma: 2657572
Join Date: Jan 2017
Location: Poland
Device: Various
|
It is not such a difficult nut to crack.
The plugin has one imperfection that I don't want to correct: image file names must not contain spaces. |
![]() |
![]() |
![]() |
#17 |
Member
![]() Posts: 17
Karma: 10
Join Date: Sep 2021
Location: Spain
Device: Kobo Sage
|
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
|
If you have the height, you could try and figure out how tall each "line" is, then make a series of classes like:
Code:
.img-2-lines { height: 2em; max-width:100%; max-height:100%; object-fit:contain; } .img-3-lines { height: 3em; max-width:100%; max-height:100%; object-fit:contain; } (etc.) Code:
Find: <p><img width="\d+" height="3\d+" src="(.*?)"/></p> Replace: <p style="text-align:center;"><img class="img-3-lines" src="\1"/></p> But as everyone is saying, you'd really need to manually go through each one to get an ideal solution, or just deal with some weird formatting. You can't get everything from nothing. |
![]() |
![]() |
![]() |
#19 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Inline sizing ![]() ![]() ![]() If your REGEX fu and CSS fu were above novice level, you might Move the inline styling to the CSS, then merge duplicate styles. ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Show info about the image in popup window of image viewer when reading an ebook | codychan | Calibre | 2 | 06-04-2021 05:04 PM |
Error message: Invalid image: cannot identify image file <_io.BytesIO object at 0x000 | bkleine | Calibre | 0 | 12-11-2020 04:39 PM |
Can I get metadata from cover image? The image is correct but all other data is wrong | mydjtl | Library Management | 1 | 12-14-2017 05:15 PM |
Display of a png image linked to a svg image | roger64 | Editor | 6 | 03-13-2015 06:21 AM |
Image on click change to nex image for Ipad view. | vinayaksanga | ePub | 9 | 04-29-2013 06:49 AM |