![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2023
Device: Kobo Clara 2E & Kindle Paperwhite 2018
|
Images inside ebook stretched after converting
This is driving me crazy! I converted an AZW3 file to an EPUB and the Calibre viewer shows the images just fine. But when I send that EPUB to my Kobo device, the images are stretched and resized. Why??? I've also tried sending it as a KEPUB and that doesn't change a thing. Tried converting it to a KEPUB first and sending that to the device, also no change. The images look fine on my Kindle Paperwhite, but I can't them to look right on my Kobo!
How do you convert an ebook so that all images (not just the cover) keep their aspect ratios? |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,543
Karma: 9250680
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Can you open the book in the Editor.
Go to one of your images and paste the code for the image here. Might also help if you paste the same code from the AZW3 file to see what is changing. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,758
Karma: 59473090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
FWIW Calibre (and others) use common WEB tools that are very forgiving of bad code.
A common poor practice is Code:
width: auto; height: auto; This is valid, just not ideal for e-readers. Attach the CSS (Do NOT post the book unscrambled) and the line of code for a badly rendered image |
![]() |
![]() |
![]() |
#4 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43,350
Karma: 165170674
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
You might also want to try using the KindleUnpack plugin to convert azw3 to epub. It doesn't change the CSS and structure nearly as much as calibre ebook converter does.
|
![]() |
![]() |
![]() |
#5 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,392
Karma: 142887248
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
And then load the epUb into the editor and run epubcheck to fix the errors. There will be some errors.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2023
Device: Kobo Clara 2E & Kindle Paperwhite 2018
|
Using KindleUnpack plugin did nothing different than the regular Calibre conversion to epub. Below is a snipit of the code for one of the images. It has actual sizes!! So now I'm thinking I need to be asking this question in a Kobo forum rather than the Calibre forum!
<img align="center" border="0" width="533" height="480" src="../Images/image00023.jpeg"/> |
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,758
Karma: 59473090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() Images go inside Block level (that is what gets the text-align:center) AFAIK there is no align:. it is text-align: (see above) Kobo's are fussy about the rules and will ignore things in broken code |
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2023
Device: Kobo Clara 2E & Kindle Paperwhite 2018
|
After seeing these responses, I did a little reading on Kobo EPUB Guidelines and discovered that images with both width and height properties can be distorted on the Kobo. The original AZW3 file had a lot of invalid coding, as pointed out above, including a bunch of empty divs trying to use "page-break-after:always" (which was NOT working). The file also had only one HTML (unsplit) and used all inline styles rather than a stylesheet.
The solution was to convert the AZW3 file into a new EPUB and let Calibre split it. Then edit the CSS in the stylesheet to remove all width properties from any image styles. This not only fixed the image aspect ratio problem, but now page breaks are working properly, as well. It's interesting to see how the two devices—Kindle Paperwhite and Kobo (received recently as a gift)—handle ebook files so differently. I prefer the freedom of the Kobo (tired of jumping through hoops to get my books to work outside of the Amazon universe), but the Kindle does seem to be a lot more forgiving when it comes to reading code. Thank you all for your responses that led to a working solution. Still learning! |
![]() |
![]() |
![]() |
#9 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,758
Karma: 59473090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Welcome to the world of different Device Makers do it their way.
![]() (I am glad I don't have to coded books professionally ![]() ![]() Various models have their unique foibles. That said, that code still had errors. W3C schools is a great references |
![]() |
![]() |
![]() |
Tags |
aspect ratio, calibre, convert, images, kobo |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble with stretched images on my kindle devices | JHanzo | Sigil | 3 | 02-07-2023 10:21 PM |
Stretched Images on Viewer | Erwinstein | Viewer | 1 | 03-18-2021 12:13 PM |
Stretched images in ebook viewer? | tiwanaku185 | Calibre | 0 | 09-06-2018 04:31 PM |
Stretched out images in an ePub (textbook) | MelBr | ePub | 7 | 11-11-2013 05:01 AM |
Stretched images in ebook viewer? | ohemeffgee | Calibre | 10 | 11-14-2012 02:12 AM |