Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-06-2020, 10:27 AM   #1
mclien
42, the answer
mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.
 
Posts: 124
Karma: 17798
Join Date: Sep 2011
Location: Germany
Device: Pocketbook 603
epub image displayed only partial

Hi there,
I own an old Trekstor Pyrus mini.
Sadly I have book with some images/ graphics, which won't display completely. Only the left half of the image is shown and the rest is cut of.
Changing the font size or rotating the book to landscape won't help.

Is there a way to re-edit the epub file directly?

EDIT.
Sorry, my bad, seems to be a problem of the reader. Calibre scales it correctly.

So, I guess it's something about the settings of the epub format. It seems calire has some settings to change settings, like I can convert the book from one epub format to another. Any hints on that?

Last edited by mclien; 08-06-2020 at 10:35 AM.
mclien is offline   Reply With Quote
Old 08-06-2020, 11:09 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,329
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Sometimes newer devices/apps (like Sigil or Calibre) better support ePub/html coding standards and are able to properly display an image that older devices can't handle. Most of the time that would require "dumbing down" the code so that it works with those older devices. Without seeing an example of the CSS/HTML used in the book, we can't be sure and can only guess at what could be the problem.

Can you open the epub in Sigil, or Calibre editor, and copy the section with the image html, and the associated CSS?
Turtle91 is offline   Reply With Quote
Advert
Old 08-06-2020, 12:21 PM   #3
mclien
42, the answer
mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.
 
Posts: 124
Karma: 17798
Join Date: Sep 2011
Location: Germany
Device: Pocketbook 603
<p class="Body-text-no-paragraph1"><span class="CharOverride7">Connection</span> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p><img alt="" class="calibre3" src="../Images/1connection.png"/>

.calibre3 {
height: auto;
width: auto
}

the readers screen resolution is 600x800 (withxhight)

Some images are 596x439 which nearly fit (the margin subtracts 5+5 pixels)
some are 962x586 (or even 1553x1186)

so I guess, i have to change the "auto" in the css to something else?
mclien is offline   Reply With Quote
Old 08-06-2020, 12:50 PM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,329
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Some devices might hang up on not having a surrounding tag around the <img>....a bare <img> might not work properly. Also, I wouldn't apply 'auto' to both (or either) height/width. If you define both height/width you may lose the proper aspect ratio and the image could look stretched or scrunched.

Try this, and see if it helps:

Code:
.image     {width:95%; margin:2em auto}
.image img {width:100%; max-width:586px}

<p>...</p>
<div class="image"><img alt="" src="../Images/1connection.png"/></div>
The width:100% will make the image fill the width of the container (the <div>) which is set to center on the screen and fill 95% of the width of the screen. The image height will be auto set to display the correct aspect ratio. I also add the max-width set to the width of your image. While it's not technically a direct 1:1 between max-width pixels and image-width pixels, this helps in preventing small resolution images from getting overblown and fuzzy.
Turtle91 is offline   Reply With Quote
Old 08-06-2020, 12:52 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: 79,408
Karma: 145491800
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 mclien View Post
Hi there,
I own an old Trekstor Pyrus mini.
Sadly I have book with some images/ graphics, which won't display completely. Only the left half of the image is shown and the rest is cut of.
Changing the font size or rotating the book to landscape won't help.

Is there a way to re-edit the epub file directly?

EDIT.
Sorry, my bad, seems to be a problem of the reader. Calibre scales it correctly.

So, I guess it's something about the settings of the epub format. It seems calire has some settings to change settings, like I can convert the book from one epub format to another. Any hints on that?
In the CSS, add the following code...
Code:
img {
  max-height: 100%;
  max width: 100%;
}
JSWolf is offline   Reply With Quote
Advert
Old 08-06-2020, 01:23 PM   #6
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,329
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
In the CSS, add the following code...
Code:
img {
  max-height: 100%;
  max-width: 100%;
}
I have that in my personal css file as a catch-all in case I don't specify a max-width for a particular image. I have it near the top of the css file, so any styles added later would take priority over it. Don't forget to add the '-' in max-width.

In this particular case, however, it doesn't serve a useful purpose. You've already set the width at 100%, so max-width of 100% means nothing....and if you set the max-width to roughly equal the image width, then you are covered from the fuzzy/stretched image syndrome.

The max-height isn't sufficiently consistently implemented among all the readers/apps. It is defined in the standards as the "height" of the container...but what does that mean in real life? The height of the screen, the height of the div, the height of the chapter, or the height of the reflowable scrolling window that is 69 'pages' long? It's OK to have it in there, but I'm not sure if it helps all that much.
Turtle91 is offline   Reply With Quote
Old 08-06-2020, 01:31 PM   #7
mclien
42, the answer
mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.
 
Posts: 124
Karma: 17798
Join Date: Sep 2011
Location: Germany
Device: Pocketbook 603
@Turtle91
sadly no change.

EDIT:
I'm thinking about the "dirty way". rescale the images and replace them.

EDIT2:
Did a quick test with one image. At least that's working and it's only 4-5 images...

Last edited by mclien; 08-06-2020 at 01:41 PM.
mclien is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct epub Title Not Displayed in iBooks ellentk Calibre 10 07-02-2016 11:36 AM
Cover Only Displayed Correctly on MOBI but not EPUB dwal Conversion 3 03-01-2013 01:26 PM
EPUB not displayed properly in Prestigio 3162 The CB Sigil 71 04-29-2012 05:45 AM
convert to epub - sometimes not a full page displayed foghat Conversion 4 12-27-2011 10:42 PM
Epub reader - end of book not displayed. Moonraker EPUBReader 11 06-28-2010 11:19 AM


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


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