Komga: [Bug] fit screen & fit width does not stretch width when image is smaller than viewport

Created on 7 Sep 2020  路  7Comments  路  Source: gotson/komga

Komga environment

  • OS: Ubuntu 20.04
  • Komga version: 0.62.4
  • [ ] I am running Komga with Docker

    • Docker image tag [e.g. latest, beta]:

  • [x] I am running Komga from the jar

    • Java version: 1.8.0_211

  • [X] I have a problem in the web interface

    • Browser (with version):

  • [ ] I have a problem with an OPDS client application

    • OPDS Application (with version):

  • [ ] I have a problem with the Tachiyomi extension

    • Tachiyomi version:

    • Tachiyomi extension version:

Describe the bug

When I try to scale images to fit the screen, it does not work and the image stays with the original scale.
Also, is it possible to define a scaling option as default for all users / books ?

Thanks a lot for the tool, it is truly amazing!

Steps to reproduce

  1. Go to any book
  2. Start reading it
  3. Click on setting and change "Scale type" to "Fit screen"

Expected behavior

image should maximize in the page and use as much as width/height as possible

Actual behavior

Nothing change

Additional context

Add any other context about the problem here.

Screenshots

If applicable, add screenshots to help explain your problem.

image

Log file

If applicable, add an excerpt of the log file (max 20 lines), or a link to a gist containing the log file.

bug released

Most helpful comment

Easily reproduced in Safari, Chrome, and Firefox, with the dev tools to set a specific screen size (very large one). It only happens if the source image is smaller than the view port.

It affects both _Fit Width_ and _Fit Screen_.

All 7 comments

What's the original image size, and what's your viewport size?

You need to fill the template properly with your browser brand and version.

I can't reproduce this at all.

Are you by any chance going from "Fit height" to "Fit screen"? In that case, if the height of your image is larger than the height of your browser viewport, then of course nothing will change. "Fit screen" essentially means "Fit height if the height of the image is larger than the height of the viewport, otherwise fit width if the width of the image is larger than the width of the viewport, otherwise display everything".

You can easily verify this by going to "Fit width" and then to "Fit screen"; if it behaves differently and actually changes display, then the above applies and the bug doesn't exist.

Easily reproduced in Safari, Chrome, and Firefox, with the dev tools to set a specific screen size (very large one). It only happens if the source image is smaller than the view port.

It affects both _Fit Width_ and _Fit Screen_.

Thank you @gotson
sorry for the lack of information, I missed those fields. I will be more careful going forward.
The image is indeed smaller than the view port (image: 466x717, computer resolution: 1920x1080).

thanks again for the tool and your help

:tada: This issue has been resolved in version 0.62.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Thank you very much @gotson for the quick fix!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muchtea picture muchtea  路  7Comments

gotson picture gotson  路  7Comments

frameset picture frameset  路  3Comments

gotson picture gotson  路  7Comments

gotson picture gotson  路  9Comments