Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] restrict image height in continuous reader #152

Closed
Leeingnyo opened this issue Jan 26, 2021 · 2 comments · Fixed by #166
Closed

[Feature Request] restrict image height in continuous reader #152

Leeingnyo opened this issue Jan 26, 2021 · 2 comments · Fixed by #166
Labels
enhancement New feature or request

Comments

@Leeingnyo
Copy link
Member

Some scanned comics files have its book spine. Their ratio is so odd and unbalanced (for example, some book has 22(W) x 3000(H) spine image).
In the continuous reader, its width fits the screen (max 900px) and the height of example spine image becomes 122,727px, showing nearly endless purple image. https://imgur.com/a/vlavZKA

I tried to resolve this by adding following style temporarily.

img[uk-img] {
    height: auto;
    width: auto;
    max-height: 2000px; /* if removed, images have their original height */
}

This style restricted the height of image well and preserved its ratio, but caused another problem:
If the manga image has smaller width than 900px, it has its original width, not fitting the screen anymore.
The reader would not have unified image widths

image
Fig 01. the width of small image has its original size (850px)

Let me know about your opinion!


Saying shortly, I want to restrict too long height of the unbalanced image to reasonable height.

@Leeingnyo Leeingnyo added the enhancement New feature or request label Jan 26, 2021
@hkalexling
Copy link
Member

I am not sure setting max-height is a good idea. For example, webtoons typically have very long pages. One solution I can think of is to only apply max-height to pages with very small width values (e.g., < 30).

@mango-assistant
Copy link

Hi there! The feature has been added in v0.20.1. Thanks for the feature request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants