Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-17-2024, 07:34 PM   #1
mshubes
Junior Member
mshubes began at the beginning.
 
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?
mshubes is offline   Reply With Quote
Old 02-17-2024, 08:00 PM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,088
Karma: 4911876
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.
Karellen is online now   Reply With Quote
Advert
Old 02-17-2024, 08:18 PM   #3
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,764
Karma: 54401244
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;
in the CSS for the image (style)
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
theducks is offline   Reply With Quote
Old 02-17-2024, 11:33 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,238
Karma: 145277352
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, 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.
DNSB is offline   Reply With Quote
Old 02-18-2024, 05:15 AM   #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: 73,858
Karma: 128597114
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 DNSB View Post
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.
And then load the epUb into the editor and run epubcheck to fix the errors. There will be some errors.
JSWolf is offline   Reply With Quote
Advert
Old 02-19-2024, 09:32 AM   #6
mshubes
Junior Member
mshubes began at the beginning.
 
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"/>
mshubes is offline   Reply With Quote
Old 02-19-2024, 10:32 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: 29,764
Karma: 54401244
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 mshubes View Post

<img align="center" border="0" width="533" height="480" src="../Images/image00023.jpeg"/>
AFAIK That is not valid coding.
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
theducks is offline   Reply With Quote
Old 02-19-2024, 11:04 AM   #8
mshubes
Junior Member
mshubes began at the beginning.
 
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!
mshubes is offline   Reply With Quote
Old 02-19-2024, 12:15 PM   #9
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,764
Karma: 54401244
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
theducks is offline   Reply With Quote
Reply

Tags
aspect ratio, calibre, convert, images, kobo

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 04:00 AM.


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