sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.66k stars 1.73k forks source link

Display centerfold pictures in comic books #1324

Open R-Usher opened 4 years ago

R-Usher commented 4 years ago

In many comic books you can see a pair of pages composed as a single picture called centerfold, see https://en.wikipedia.org/wiki/Centerfold It would be good to display pictures with landscape layout (horizontal as a screen) always as a single page (centerfold) no matter what view is used. For cbz, cbr, cb7 formats it should be easy to implement, I think. I know this solution may be inappropriate in some cases, but for sure it's better than nothing.

kjk commented 4 years ago

Can you share an example of such file (to keep it private, you can send to kkowalczyk@gmail.com). Can't make progress without a test file.

GitHubRulesOK commented 4 years ago

@kjk my interpretation is this is similar to #1184 and several other similar issues where a double spread is between single pages the desire is that in continuous mode versus page mode the zoom needs to dynamically zoom width in / out / in as each page becomes the focus of interest

SumatraPeter commented 4 years ago

In many comic books you can see a pair of pages composed as a single picture called centerfold ... It would be good to display pictures with landscape layout (horizontal as a screen) always as a single page (centerfold) no matter what view is used.

Each page of a modern American comic is 6.625x10.25", and in years gone by could be up to 7.25x11". Thus a double-page landscape spread is composed of two facing portrait pages. Also, depending on whether the comic was saddle-stitched/stapled (floppies) or perfect bound (TPBs/HCs), there may or may not be white space (gutter) cutting through the middle of the double-page spread. Moreover double-page spreads can be present in any part of a comic (more than once too), and aren't restricted just to the middle couple of pages. There are even double-page spreads where you're supposed to turn the comic sideways to view properly, as also trifolds or quatrefolds (especially things like fold out posters, maps etc.).

So the question is, how is any app to know which two (or more) consecutive page scans/images to display together always? AFAIK you'd need some sort of image recognition/AI to know which set of pages contain a single image.

R-Usher commented 4 years ago

@kjk Sent 2 cbr files @GitHubRulesOK @SumatraPeter Don't tell me tales, please. I only want to have the simplest solution for the most common case of comic books only. For example:

Cover 768x1024 Endsheet with map 1536x1024 Two pages 768x1024 each Another two pages 768x1024 each Centerfold 1536x1024 Two pages 768x1024 each Another centerfold (a.k.a. double-page spread) 1536x1024 Two pages 768x1024 each etc.

I don't want to play with PDFs, comic books only. I don't need zoom (though upsizing of a smaller picture for two facing pages would be welcome). I don't need AI as picture sizes are obvious.

GitHubRulesOK commented 4 years ago

@kjk perhaps consolidate with https://github.com/sumatrapdfreader/sumatrapdf/issues/152 or https://github.com/sumatrapdfreader/sumatrapdf/issues/41

related to https://github.com/sumatrapdfreader/sumatrapdf/issues/1134 https://github.com/sumatrapdfreader/sumatrapdf/issues/872 https://github.com/sumatrapdfreader/sumatrapdf/issues/1184

https://forum.sumatrapdfreader.org/t/feature-request-zoom-to-content-width/144 https://forum.sumatrapdfreader.org/t/feature-request-two-fixed-positions-for-horizontal-and-vertical-formats/201 https://forum.sumatrapdfreader.org/t/can-sumatra-show-a-double-page-as-two-consecutive-single-ones/2062/3 https://forum.sumatrapdfreader.org/t/feature-request-landscape-images-in-facing-book-view/773

kjk commented 4 years ago

@R-Usher thanks, I got the files.

As I understand, the request here is the same as #152 i.e. in single page / continuous view, if pages are of different sizes, currently we have a fixed zoom level for all pages, calculated to fit width the smallest page.

We should instead size each page to fit width.

SumatraPeter commented 4 years ago

@R-Usher: It's not a tale but plain fact that what often seems to users to be a 'simple' solution that should be 'easy' to implement is anything but, especially to the person who's actually writing the code. So let's leave it to kjk to judge just how simple (or not) this is to implement.

R-Usher commented 4 years ago

@kjk Did you browse cbr files which I sent to you? Could you explain which view, zoom and UI I should use to see those comic books properly?

kjk commented 4 years ago

View continuous and zoom 'fit width' (ctrl-2)

R-Usher commented 4 years ago

@kjk Really? I'm afraid you was listening to the tales and was led astray from my request.

Download sample TheComic.cbz from my OneDrive page https://1drv.ms/f/s!AKm4ZaWdL2tfgi8 It should be displayed as follows:

BTW. There is no "Continuous" option in build 11673, I can see only "Show pages continuously”. And only a part of a portrait page is displayed with zoom "Fit width". It's better to use "Book view" with zoom "Fit content", but the primary goal of my request is to display image of spread/centerfold pair separately, zoom is a secondary feature.

GitHubRulesOK commented 4 years ago

@kjk well done on closing the "Advanced fit to width" issues however it appears that the issue in this case is the other one of treating double pages as if they were split to singles. see #872 https://forum.sumatrapdfreader.org/t/can-sumatra-show-a-double-page-as-two-consecutive-single-ones/2062/3 https://forum.sumatrapdfreader.org/t/feature-request-landscape-images-in-facing-book-view/773

To summarise my view is that the "mode" should be similar to book mode (one single RH or Manga LH ?) cover page then pairs of singles (book view, facing pairs not "simple facing singles") until a double spread is reached when it should be "COUNTED" as if two pages (some users ask for seams and or white space to be removed, but that is not the case here, since the images are already a cojoined double spread) untitled

GitHubRulesOK commented 4 years ago

For any comic book authors reading this thread As there is no general standard it would be so much simpler if any such double pages are stored as two singles to be viewed side by side just the way SumatraPDF and many viewers do with their book mode. Better yet store the two halves without any borders on the joining sides (L trim R for non manga and R trim L for manga) SumatraPDF and most other book readers will butt those single halves together

In advanced settings for comic book alter PageSpacing = 0 4 dummy-28 page.zip

@kjk see the "Holy Grail" book mode illustrated here on the right

Untitled

And here correctly split pages are working in SumatraPDF Comic Book - Book Mode image

kjk commented 4 years ago

So to be clear: this is about a book view (2 pages at a time) and showing large pages to take the space of 2 pages.

This was not at all clear from the bug report.

GitHubRulesOK commented 4 years ago

@kjk I may have made a wrong call based on initial description since these two modes have been requested a long lime in many different ways / terminology

The layout style as given has SOME double pages already stitched / scanned as pairs I consider these files as "hybrids" and if there was a standard for comic books would have objected to such problematic layouts

The first case (Advanced fixed width) is fairly simple to describe / resolve Thanks again

This second case can be much more problematic as it can involve Manga settings and may start with Facing or Cover pages AND worse the user may also change those modes partway through

Some users want those split for constant scale (say on a tablet in Portrait mode without sideways scroll !) those users may need single (1/2 double) pages that will appear vertically in sequence

Some users as seems to be the case here want the halves treated as if they were 2 facing pages when viewed in landscape book mode.

Treating double page spread as 2 sequential 1/2;s solves both issues (can also help with bookmarking)

However the examples as given/described do not mention Manga nor any need to re-sync page modes part way through. (others raised such features in their requests)