Closed TyrantRC closed 5 months ago
Kavita does not upscale images, so what you're seeing is Kavita letting the image take a maximum of the full viewport width, it doesn't force it though.
If the original width of your image is less than the width of your viewport what you are experiencing is what you get.
The padding at the top looks to be a bug though.
Kavita does not upscale images, so what you're seeing is Kavita letting the image take a maximum of the full viewport width, it doesn't force it though.
Why does it say "image scaling" or am I misunderstanding things?
If the original width of your image is less than the width of your viewport what you are experiencing is what you get.
@therobbiedavis Can you elaborate on this? it sounds like it will not scale the image at all, but I have manga that is horizontally smaller than my screen and kavita still fully fits it to width, while it does not with others. Not sure if what you are referring to is a soft limit.
This may be a limitation of browser readers, but most web readers fit to maximum width, not sure why this should be different.
Right now I have to adjust the zoom of the page in my browser manually, and then readjust it again when I go back to the menu page. I don't see a reason why kavita shouldn't give the user the option to fit to width when the browser can do that already, albeit a little bit more rudimentarily.
Why does it say "image scaling" or am I misunderstanding things?
I understand how that can be confusing, image scaling is just in reference to how the image will fit on the screen. Either fit the image based on screen height or screen width.
@therobbiedavis Can you elaborate on this? it sounds like it will not scale the image at all, but I have manga that is horizontally smaller than my screen and kavita still fully fits it to width, while it does not with others. Not sure if what you are referring to is a soft limit.
I would be interested in debugging that, because if the manga's horizontal image resolution is smaller than your screen's horizontal resolution it should not fully fit while in width mode.
This may be a limitation of browser readers, but most web readers fit to maximum width, not sure why this should be different.
This is because we don't want to pixelate the image by forcing it larger than its natural resolution. We also have to consider ultra-wide resolutions.
I would be interested in debugging that, because if the manga's horizontal image resolution is smaller than your screen's horizontal resolution it should not fully fit while in width mode.
@therobbiedavis I don't want to be rude, I truly don't. I feel like either I'm not understanding what you are saying or you don't understand what fit-to-width means, because that's the whole purpose of the feature and you are telling me it doesn't do that.
The image I posted above fits completely, and you can see here that the horizontal size of that particular page is 1336px, while my screen is 1440px. It's obviously scaling it up to almost the full screen without counting for like 10px of the scrollbar.
I have to say, this is like a huge reason for me to stop using Kavita altogether, the library manager is excellent, the server is super lightweight, but if I cannot use the native reader as an actual reader then what's the point? You guys need to either allow the user to open manga/comics with another reader from the library, or allow the user to control how they want to read it, in this case by actually implementing the feature how it should work.
Maybe consider adding a tick of "force to width" if you still want to accommodate theaters-like screens to the reader? But please don't sacrifice the whole feature. With a huge screen you can actually just read it in "original size", you cannot do that with a small screen.
Here is an example from a popular reader (Honeyview) fitting the same page I linked above
Original size -see the black borders to both extremes
Fit to width -covering 100% of my horizontal resolution
@TyrantRC I will discuss with @majora2007, but don't take this the wrong way I don't know if this is a feature that will be implemented. From our discussions with users they would rather not have their images pixelated.
I have no idea why that particular manga is taking up the whole screen without debugging more, however to show you what I am talking about I have a few images to support why we made this decision in the first place:
Manga with low resolution on a ultra-wide resolution, in width image scaling mode enabled. (Current implementation):
Same manga with low resolution on ultra-wide resolution, in forced width image scaling mode enabled. (You're suggestion):
From here on, I will just let @majora2007 weight in. After some discussion it seems he has some comments and ideas to share.
@TyrantRC I will discuss with @majora2007, but don't take this the wrong way I don't know if this is a feature that will be implemented. From our discussions with users they would rather not have their images pixelated.
Just wanted to mention that we could always have both. A "smart width scaling" and a "forced width scaling".
From here on, I will just let @majora2007 weight in. After some discussion it seems he has some comments and ideas to share.
will wait for @majora2007 input on this then.
Sorry that I haven't gotten back to you on this. To start, i do think misunderstanding is coming from the label, so I will look to fix that.
I have had this situation happen on lower resolution manga and it is indeed annoying. It's something I've wanted to work on with a new "scaling" mode, but it hasn't been a priority for me personally. The code is open source so if you are interested in driving a solution home, I'm all for it.
As of right now, I can't put much time to look into enhancing this to solve this case. I do agree it needs to be fixed, but I have my plate full with much higher impacting features for the community.
It's something I've wanted to work on with a new "scaling" mode, but it hasn't been a priority for me personally.
@majora2007 It's fine. I'm ok with at least getting a reply about this.
The code is open source so if you are interested in driving a solution home, I'm all for it.
Believe me, if I knew how to do it I would have done so already.
That said, I saw the implemented solution in Ollm's OpenComic. They added a checkbox to let the user decide if they want to avoid enlarging more than the original size.
And I'm guessing that's just a conditional, but nothing is ever that simple in coding, so I understand your decision.
I do believe that your code has a bug though, as I said before, Kavita enlarges some images past their 100% when as far as I understand, you are mostly trying to avoid that. So even if you don't want to implement the feature I'm suggesting, you should probably look into how to make your current "image scale" consistent.
What happened?
Caveats:
What did you expect?
I expected the image to be fitted to the max width of my screen, especially in fullscreen mode.
Version
Version 0.7.13.0
What OS is Kavita being run on?
Windows
If the issue is being seen on Desktop, what OS are you running where you see the issue?
Windows
If the issue is being seen in the UI, what browsers are you seeing the problem on?
Chrome
If the issue is being seen on Mobile, what OS are you running where you see the issue?
None
If the issue is being seen on the UI, what browsers are you seeing the problem on?
Chrome
Relevant log output
Additional Notes
My display resolution is 1440x900
I had a theory that this might happen with comics/manga that have images of different sizes inside their respective folders (page 1 width of 1124px, page 5 width of 830px), not sure up to what folder level though, and not sure how to test it.
The following is one of the tests I tried:
I also tried opening it in another browser (firefox) and it's even worse. For some reason firefox adds a empty padding to the top of the image, this also only happens with manga that present the "width issue", because the ones that properly expand to their full width don't have the padding either