View Single Post
Old 06-14-2025, 09:26 PM   #39
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,857
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by ElMiko View Post
Interesting....

So, to be clear, I don't have a problem with the scrollbar per se. I mean, if it is necessary to see the whole image then I definitely want it! What I think I'm seeing now is that even at 100%, the vertical scroll bar is actually just showing a sliver of white space below the image, not actually revealing any more of the image (and i assume this is what you mean by "that means nothing"). So what's really happening (I think...???) is that the picture IS 100% of the window height... its just that the container is greater than 100% of the window height, hence the extra little sliver of whitespace that results in the scrollbar (unless you hide "overflow").
Sigil shows a bit more than 100%, for that way you see the white space below the image. For that reason I said it means nothing.

Quote:
Regarding how the two programs render it, I'm seeing that Calibre proportionally resizes the image when you narrow or widen the window, but Sigil stretches the image if you widen the window (which you alluded to in your first post).
One moment! When you say Calibre, what do you mean? Calibre Viewer or Calibre eBook Editor? You can't compare Sigil/PageEdit with Calibre Viewer; you need to compare Sigil with Calibre eBook Editor. And both of them, display the same image when you resize the Preview Pane. Regarding Calibre Viewer, it doesn't honor the code inside the epub. Open my Temporal4.epub with the Sigil's plugin Readium and you'll see that the image has the same behaviour as in Sigil/Calibre eBook Editor.

Quote:
If you set the image width to "auto", again, Calibre proportionally resizes the image when you widen or narrow the window. Basically, it doesn't allow for overflow—hidden or not. In Sigil/Preview, widening the window preserves the aspect ratio just fine, BUT narrowing the window results in the left side of the image being cut off (presumably because the overflow has been hidden).
As I said, Calibre Viewer is not honoring the epub code (the image doesn't take the 100% of the viewport when you narrow the window). Sigil, OTOH, displays properly the image with a height of 100% and a width to maintain the proportion ("width: auto" means a width to maintain the proportion of the image; meanwhile "width: 100%" means a width of 100% of the viewport width). As the window is narrow than the image, and you are using "width: auto", then you can't see it fully.

Quote:
Now.... here's where things go completely off the rails. If I use the attached "Test1" file which seems to be the same as yours except that I've switched out your image for my image, setting width to "auto" results in a squishy image in Calibre!

If i change your image to "auto", it resizes perfectly in Calibre (but cuts off the image in Sigil); if i use the same code on MY image, it gets squished in Calibre.

I've attached both your file (modified to "auto") and mine...
It's all ok. Your image is already squished (is a narrow image), Calibre just maintains the proportion; with "width: auto" it won't stretch the image. My image resizes "perfectly" as you say because the width of my image is bigger than yours.
RbnJrg is offline   Reply With Quote