Paperback-iOS / app

Repository to host app releases, issues, and feature requests for Paperback
https://paperback.moe/
665 stars 20 forks source link

[REQUEST] Crop Borders Option #232

Open seansusmilch opened 3 years ago

seansusmilch commented 3 years ago

Description An option that removes empty whitespace at the edges of pages.

How would it improve the App? Less empty space. More room on the screen for the actual panels.

Additional context This feature is in Tachiyomi. Here's an example comparing on vs. off.

ConradWeiser commented 3 years ago

Doing image processing on all of the pages loaded from the internet tends to be a more resource intensive task. There's no magic "Get rid of whitespace" function. You'd have to load and process each page as you see them.

I'd have to look into how Tachiyomi does it, but it removes some of the 'simplicity' which we're aiming for with Paperback.

seansusmilch commented 3 years ago

Doing image processing on all of the pages loaded from the internet tends to be a more resource intensive task. There's no magic "Get rid of whitespace" function. You'd have to load and process each page as you see them.

I'd have to look into how Tachiyomi does it, but it removes some of the 'simplicity' which we're aiming for with Paperback.

The cropping in Tachiyomi seems to be nearly instantaneous, even on my dying 7+ year old tablet.

I understand your goal of simplicity but this feature would be awesome especially for long screened phones. It would make the actual panels bigger, increasing readability and decreasing the likelihood of a user needing to zoom in on the page.

I personally get annoyed when I have to zoom in on a page or many pages in a row. Even more so when I'm holding my phone with 1 hand which is almost all the time.

FaizanDurrani commented 3 years ago

Android phones have A LOT more resources to work with than iphones. Paperback has to work with 2 gigs of on the lower end of the iphones and some pages are just too big to be able to do transformations like this on the fly. We can try it out but it will be extremely low priority and chances of it being added are slim to none.

seansusmilch commented 3 years ago

Android phones have A LOT more resources to work with than iphones. Paperback has to work with 2 gigs of on the lower end of the iphones and some pages are just too big to be able to do transformations like this on the fly. We can try it out but it will be extremely low priority and chances of it being added are slim to none.

That may be true for the more recent flagships but I'm not convinced that it would be a problem. If you're talking explicitly about RAM, the "dying 7+ year old tablet" I mentioned is a Galaxy Tab Pro 8.4 and also has 2GB of ram. On top of that, the CPU in it, the SD800, gets absolutely crushed (according to benchmarks) by the A9 (in the iPhone 6s, earliest iPhone with 2GB of ram), and as said before, the performance when cropping borders is very good.

If there are other limitations of iOS devices that Android devices aren't subject to then I understand.

Anyways, I'm glad you're even considering trying it.

kymotsujason commented 2 months ago

This is old, but I wanted to add to this because it has been implemented elsewhere. Open source, should decrease the time needed to experiment.

This feature will add great immersion for reading, since all or most of the screen will be taken up by actual content. It's much more efficient use of the screen space. For the smallest and oldest devices that are supported by Paperback, I think this feature is a must. Companies raced to increase screen to body ratio of phones for a reason, even Apple joined with their iPhone X. The tradeoff of additional processing time should be a lesser impact with preloading. Battery usage will increase, but is a small hit compared to the page load.

With the method used elsewhere, the ram impact is negligible and shouldn't be an issue. What is an issue is the additional processing time added. I tested it a bit and used Geekbench single core scores to make this comparison, it's not 100% accurate, but it'll give an idea. On an iPhone 15 Pro Max, it'll likely take around 70ms per page (unnoticeable during normal use). However, that might mean it'll translate to around 300ms for the lowest supported device, an iPhone SE. This is for the most common page size, it will take longer for webtoons if done on those. Ideally, only a certain range of page sizes (ie. not webtoon) should be supported because of this delay, while all devices should be supported because of the benefits. The lower end device delay is speculation, I think it'll likely be faster and there is the option of parallel processing (shaves off 50ms maybe).