Skip to content

About

YACReader fork with an option to open finished comics from the first page instead of their last page

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

4,147 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About this fork

A personal fork of YACReader with changes to the comic reader and the library, listed below. Each reader change also has a closed preview PR that shows it as a diff against upstream develop, ready to send upstream if the maintainer wants it. The upstream README starts after the line.

Change Kind PR
Choose the page comics open at Option #3
Fit pages to height in continuous scroll Option #5
Image adjustment menu Feature #12
Go 5 or 10 pages Shortcuts #4
Rate and favorite comics while reading Feature #9
Toolbar in full screen Feature #8
Page number when the page changes Display #11
Next file after an unreadable one Bug fix #1
Comics removed from the Reading list Bug fix #2
Folders of images as comics Library #10
Lanczos3 and Lanczos2 scaling Option #6
Page turns without scaling Speed #13
Sharper enlarged pages with Anime4K Option #14

Builds: open a successful run of Build and download the windows-x64-qt6-… installer or the macOS .dmg. They are unsigned, need a GitHub sign-in, and expire after 90 days.

Screenshots come from the fork's Linux build with generated sample pages. "Upstream" shots run the same steps on upstream develop (268288b).

Choose the page comics open at

Options > General > Open comics at

The Open comics at group in Options, General

Setting Finished comic Unfinished comic
The last page read (default) last page last page read
The first page if the comic is finished, otherwise the last page read first page last page read
The first page first page first page
  • Finished: the reading progress is on the last page, the same rule the library uses to mark a comic as read. Closing a comic on its final double page spread counts too.
  • Where it applies: comics opened from the library and comics opened as files.
  • Requested on the forum: Read comic are opened from the last page.

Fit pages to height in continuous scroll

Options > Image adjustment > Continuous scroll

The Continuous scroll group in Options, Image adjustment

Fit pages to width (default) Fit pages to height
Continuous scroll with the page as wide as the window Continuous scroll with the whole page as tall as the window
Pages are as wide as the window, so you scroll through each one Pages are as tall as the window, so you see each one whole
  • A page that would end up wider than the window, such as a double page spread, fits the width instead.
  • Comics marked as web comics in the library always fit the width.

Image adjustment menu

Right-click the page > Image adjustment, or click the arrow next to the Options button on the toolbar. It changes the options of Options > Image adjustment while you read:

The right-click menu on a page with its Image adjustment submenu open

In the menu Options > Image adjustment
Brightness, Contrast, Gamma, Reset Image options
Enlarge images to fit width/height Fit options
Continuous scroll > Fit pages to width / height Continuous scroll
Scaling method > Nearest / Bilinear / Lanczos4 / Lanczos3 / Lanczos2 Scaling
Moving a slider The arrow next to Options
The page brighter with Brightness at 15 in the open menu The same menu under the Options button with the scaling methods open
The menu stays open and the page changes when you let go Works in every mouse mode
  • Same settings as Options: a change in either one shows in the other at once.
  • Brightness, Contrast, Gamma: the page changes when you let go of a slider, or 150 ms after the last spin box step, so holding an arrow key or turning the wheel filters the pages once. The same goes for the sliders in Options.
  • Right-click opens the menu unless Options > General > Mouse mode is "Use the Left/Right buttons to turn pages", where the right button turns the page. The arrow next to Options works in every mode.
  • Full screen: the toolbar is hidden. Right-click still opens the menu, except in the Left/Right buttons mouse mode; there, show the toolbar with Hide/show toolbar (H) to reach the arrow.
  • macOS: right-click only. The native toolbar has no arrow.

Go 5 or 10 pages

The four new shortcuts in Edit shortcuts, Reading

Keys Action
Shift+← / Shift+→ Go 5 pages left / right
Alt+← / Alt+→ Go 10 pages left / right
  • Manga mode: the directions flip, as they do for ← and →.
  • Double page mode: the 5 page jump moves 4 pages, so spreads stay paired.
  • Changing the keys: Options > Shortcuts > Edit shortcuts > Reading. If you already gave one of these keys to another action, that jump starts unassigned.

Rate and favorite comics while reading

A comic opened from the library gets a favorite button and five stars on the toolbar. They show the comic's rating and whether it is in the library's Favorites. A change shows at once and is saved to the library in the background. If the library does not save it, a message says so and the buttons show what the library has.

Favorite and rating buttons
Comic from the library Favorite on and four of five stars filled
File opened directly Favorite and stars greyed out

The library, open at the same time, shows the change:

The comic shows a rating of 4 in the grid and a heart and four stars in the info panel

  • Rating: a star sets the rating from 1 to 5, and the current one clears it. Keys 1 to 5 do the same.
  • Favorite: the heart adds the comic to the library's Favorites or removes it. An open Favorites list updates too.
  • Keys: Options > Shortcuts > Edit shortcuts > Comics. The heart has no key until you set one. If you already gave 1 to 5 to other actions, those ratings start unassigned.
  • Older YACReaderLibrary: with a library from upstream or from before this change, the buttons stay greyed out.

Toolbar in full screen

Full screen (F) has no title bar and hides the toolbar. Move the mouse to the top of the screen to show the toolbar over the page, where it covers the page number in the top right corner. It hides again when the mouse moves back down to the page or leaves the screen, and when another window comes to the front (Alt+Tab).

Full screen Mouse at the top of the screen
A page in full screen with no toolbar The toolbar over the top of the same page

Exit fullscreen mode and Close at the right end of the toolbar

  • Exit fullscreen and close: two buttons at the right end of the toolbar, shown only in full screen.
  • The page stays still: the toolbar covers the top of the page instead of pushing it down.
  • Not while the magnifying glass is on or a mouse button is held, so dragging a page up to the top does not open it.
  • macOS: unchanged. In full screen macOS shows its own menu bar and window buttons at the top of the screen.

Page number when the page changes

Options > General > Display > Briefly show the page number when the page changes, off by default. With it on, turning a page shows the page number in the top left corner for a moment, then it fades out.

The Display group in Options, General, with the option turned on

Single page Double page
10/100 in the top left corner after turning to page 10 12-13/100 in the top left corner after turning to pages 12 and 13
  • When: next and previous page, Go 5 or 10 pages, Go to page, the page flow, bookmarks, first and last page, opening a comic, and scrolling onto another page in continuous scroll. It stays hidden when the page doesn't change, such as Next on the last page.
  • Double page mode: a spread shows both pages, such as 12-13/100. In manga mode they read right to left, 13-12/100, as in the page information label.
  • Show Info (I): while the page information label is on, the counter stays hidden because the label already shows the page.
  • Look: the colors of the page information label in the current theme. It stays for 1 second and fades out in 0.4 seconds; on macOS it hides after the second without fading.

Next file after an unreadable one

In a folder with Comic 1.pdf, an unreadable Comic 2.cbz and Comic 3.pdf, going from Comic 1 to the next comic shows this error:

Format not supported error

After closing it:

Previous / next comic buttons
Upstream Both buttons greyed out
This fork Both buttons available

Upstream disables both buttons and their shortcuts (Ctrl+← and Ctrl+→), so the next file has to be opened by hand. In the fork, Ctrl+→ opens Comic 3.

Comics removed from the Reading list

Removing a comic from the library's Reading list resets its progress to 0. Opening it again:

Upstream This fork
0/10 and Loading, please wait Page 1 of 10
Shows 0/10, stays on "Loading...please wait!", then crashes Opens at page 1

Folders of images as comics

YACReaderLibrary reads a folder of images as one comic, like a .cbz, without converting anything. Upstream leaves such folders out of the library (#164).

A series folder whose chapter folders show as comics with covers and page counts

  • What counts as a comic: a folder with at least one .jpg, .jpeg, .png, .gif, .tif, .tiff, .bmp or .webp image directly inside, and no subfolders or comic files (.cbz, .cbr, .pdf and the like). Other files, such as ComicInfo.xml or a text file, do not matter, and files whose name starts with a dot, like the ._ files macOS leaves, are not pages. The list is fixed, so YACReaderLibrary and YACReaderLibraryServer agree on it whatever image plugins they have, and YACReader shows these same pages when it opens a folder (upstream showed every format its image plugins read).
  • Metadata folders: @eaDir, .@__thumb, __MACOSX, .AppleDouble, .thumbnails and .yacreaderlibrary do not count as subfolders, and neither they nor the folders in them are comics. Only these exact names: your own folders, such as @Manga, are scanned like any other, and so are dot folders where the system shows them (Windows), as upstream does for archives.
  • Layouts: in Series/Chapter 1/001.jpg, Series is a folder and Chapter 1 is a comic. A folder with images and subfolders stays a folder, and its own images are left out.
  • Like an archive: cover, page count, ComicInfo.xml import when it is turned on, reading progress, and library updates when pages are added, removed or change size. With Compare the modified date of files when updating a library on, a folder comic's date is that of its newest page, so a new ComicInfo.xml does not count as a change.
Next to archives Opened from the library
Two cbz files and a folder of images side by side as comics YACReader showing page 5 of 9 of a folder comic
Harbor Lights 03 is a folder, the other two are .cbz files Opens at the page where reading stopped
  • Deleting: folder comics stay unless Also move the image folders to the trash is checked. Checked, each folder goes to the trash with everything in it. If the trash refuses a folder, YACReaderLibrary asks before deleting it for good, and then deletes only its images, ComicInfo.xml and the files Windows and macOS leave (Thumbs.db, desktop.ini, .DS_Store, ._ files). A folder that still holds anything else stays on disk, and the message lists what is left.

    The delete confirmation with the Also move the image folders to the trash box

    This screenshot comes from the Windows build.

  • Library updates: a comic or folder that sorts after a new one by number, such as Chapter 10 after a new Chapter 3, is no longer removed and added again, so it keeps its reading lists and labels. This applies to archives too.

  • Organize files: a folder comic keeps every dot in its name, and no comic is moved into a folder comic, which would turn it into a plain folder. A comic headed there goes to a numbered folder instead, such as Vol 1 (1).

  • Not covered: dragging a folder of images onto the library still imports only comic files, and Organize files does not move a folder comic to another drive.

Lanczos3 and Lanczos2 scaling

Options > Image adjustment > Scaling > Scaling method

The Scaling group in Options, Image adjustment, with Lanczos3 selected

Method Lobes What you get
Lanczos4 (default) 4 Upstream's Lanczos under a new name. The most fine detail and the most halos around lines
Lanczos3 3 In between
Lanczos2 2 The fewest halos, a little less fine detail

The same line art enlarged 3x, with the boxed part shown 3x larger again below it. The light bands next to the strokes are the halos:

The same line art enlarged 3x with Lanczos4, Lanczos3 and Lanczos2, with a close-up of the letter A

Measured on a grey edge (64 to 192) and on fine stripes, both enlarged 4x:

Lanczos4 Lanczos3 Lanczos2 Bilinear
Overshoot past the edge (grey levels) 16 15 10 0
Pixels from the edge that change 13 9 6 2
Edge rise from 10% to 90% (px) 3.0 3.0 3.0 3.4
Contrast kept on stripes with a 3 px period 98% 96% 90% 77%
  • Edges are equally steep with all three. The difference is in the halos and the finest detail.
  • Shrinking 4x, the overshoot is at most 2 grey levels with any of them.
  • Switching back: older builds of this fork and upstream YACReader don't have Lanczos3 and Lanczos2. With one of them chosen they skip their own scaling, so pages are scaled at a lower quality, and on HiDPI screens single pages show at their own size instead of fitting the window. Pick Lanczos4 before switching back.
  • The other way round, a method this build doesn't know shows as Lanczos4 and stays stored until you pick another one.
  • Requested upstream: Algorithms for image scaling asks for Lanczos3.

Page turns without scaling

In single and double page mode the pages next to the one you read are scaled to the window in the background, so a page turn shows a page that is ready instead of scaling it first.

Time a page turn keeps the reader busy before and after this change, for single and double pages

Single page mode Double page mode
Page 2 of a sample comic in single page mode Pages 4 and 5 of a sample comic in double page mode
  • What gets ready: the page shown, the next two and the previous one, in that order. In double page mode the pages are paired the way the next page turns will pair them.
  • Looks the same: the pages are pixel for pixel what the reader showed before, in single, double, manga and rotated mode, and in the magnifier.
  • When a page is not ready yet, for example right after jumping far or when flipping through double pages faster than they decode, it is scaled when it is shown, as before.
  • Memory: at most 256 MiB of scaled views, always including the one shown. Fitted to the window a 1440 x 2160 view takes about 12 MB, so all four fit; zoomed in far, or fitted to the width of a large screen, the views at the end of that order are left out.
  • Continuous scroll already scaled its pages in the background and is unchanged.

Sharper enlarged pages with Anime4K

Options > Image adjustment > Scaling > Upscale small pages with Anime4K (ACNet), off by default, with a Model choice: F8B4 (default) or F8B8-HDN.

In single page, double page and continuous scroll mode, a page shown at 1.5 times its own size or more is first shown scaled as usual, then replaced by a sharper one: Anime4KCPP's ACNet, a small neural network for line art, doubles it on the CPU in the background, and Lanczos takes it to the window size. The network sharpens the luma; colour and transparency are scaled with Catmull-Rom. The code is vendored in third_party/anime4kcpp (MIT) with the revisions it came from and a patch of the changes made to it.

The same lettering doubled with Lanczos4 and with ACNet F8B4, shown at 4x

Quality: the page shrunk to half with a 2x2 box filter, doubled again, and compared with the original (whole page, PSNR / SSIM on luma).

Method Krazy Kat page Synthetic gray page Synthetic colour page
Lanczos4 (the default scaling) 25.8 dB / 0.931 22.5 / 0.946 27.7 / 0.969
ACNet F8B4 (default model) 29.5 / 0.970 26.4 / 0.980 31.5 / 0.990
ACNet F8B8-HDN 29.9 / 0.969 26.6 / 0.981 31.7 / 0.990
Anime4K 0.9, CPU port 21.8 / 0.888 18.1 / 0.892 24.0 / 0.957
ArtCNN C4F16, CPU (not included) 30.2 / 0.973 28.2 / 0.987 32.6 / 0.992
Anime4K v4 CNN M, GPU shader 29.4 / 0.966 25.9 / 0.979 32.0 / 0.989
Anime4K v4 CNN UL, GPU shader 30.5 / 0.970 28.4 / 0.987 33.0 / 0.992

The Krazy Kat page is George Herriman's of 1922-04-02, public domain (Wikimedia Commons), in gray at 2482 x 3000. The synthetic pages are generated 2000 x 3000 manga-style pages.

Hatching Lettering
Hatching from the Krazy Kat page doubled by each method Lettering from the Krazy Kat page doubled by each method

Speed of one 2x upscale of a 1000 x 1500 page, in ms:

Gray Colour
Lanczos4, one thread (WSL) 37 39
ACNet F8B4, 8 threads (Windows) 46 66
ACNet F8B8-HDN, 8 threads (Windows) 82 99
ACNet F8B4, 1 / 4 / 16 threads (WSL) 229 / 71 / 43 253 / 87 / 61
ACNet F8B8-HDN, 1 / 4 / 16 threads (WSL) 345 / 132 / 72 not measured cleanly

Ryzen 7 5700X3D with the FMA backend, the one Windows x64 builds pick on this CPU. The Windows row is the MSVC build's test; the WSL rows are the best of 5 to 7 runs on a machine shared with other builds, so allow about ±40%. Linux x86_64 builds use the SSE backend, about 1.7 times slower.

  • CPU: the network runs on one pool of half the CPU's threads, shared by all upscales, with the fastest backend the CPU supports: FMA or AVX on Windows x64, AVX on Intel Macs, NEON on arm64, SSE on Linux x86_64.
  • Memory: the network works on strips of 256 rows, so its scratch memory stays near 28 MB for a 1600 pixel wide page. A 1600 x 2400 colour page peaks at about 157 MB more than before the upscale, Lanczos4 at 78 MB. That is about 41 bytes per page pixel, so the 4 megapixel limit below keeps an upscale near 165 MB, and each mode upscales one page at a time.
  • When it runs: only for pages shown at least 1.5 times their own size, on either side, and of at most 4 megapixels (both pages together for a double page), which also leaves out long webtoon strips; both limits are in image_processing/acnet_upscale.h. Up to 2x, Lanczos takes the doubled page to its size whatever the scaling method, since Nearest would alias the lines ACNet just sharpened; past 2x the scaling method does. In single and double page mode the page shown goes first, once the pages around it have their plain scale; continuous scroll starts with the visible pages.

Build Master Develop
Code Validation Build Status Build Status
Linux Build Status Build Status
Windows x86 Build Status Build Status
Windows x64 Build Status Build Status
MacOS Build Status Build Status
Publish Build Build Status

YACReader

"Yet another comic reader"

License

This software has been developed by Luis Ángel San Martín Rodríguez (luisangelsm@gmail.com) under GPL v3 license (see COPYING.txt).

Getting YACReader

Official releases:

https://github.com/YACReader/yacreader/releases

As a package:

Packaging status

From OBS build service:

Building from source:

See INSTALL.md

Contact

If you need help or have any suggestion, please, send me an e-mail.

Contributing

If you are interested in contributing to the project the first step should be to contact me so we can plan together the best approach, you can send an e-mail, joing the Discord server or just open an issue in this repo. For tiny bug fixes it is usually ok to open a PR directly.

Contributions are not restricted to coding; you can help the project by bringing new UI/UX ideas, designing new assets, writing manuals or tutorials, translating the apps, etc. If you are interested in DevOps, YACReader uses Azure Pipelines for CI/CD, any improvements in that area are welcome. Testing pre-releases is also really appreciated.

AI Usage

If you can't do it yourself please don't open PRs based on ideas developed using AI. If you are a software engineer it's ok to use AI as long as you know what you are doing, understanding and reviewing agent generated code before opening a PR is a must. Code that just works won't be enough to ensure I'll accept your contribution.

Dev Setup

YACReader is developed in C++/Qt and built with CMake. You need a C++20 compiler and Qt 6.9+. In Windows I use Visual Studio 2022 and in macOS I use Xcode, but I do all the coding using QtCreator.

The repo includes binaries for the dependencies needed for Windows (MSVC compiler) and macOS (clang). The 7zip decompression backend source is downloaded automatically by CMake during configuration.

To build:

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel

See INSTALL.md for detailed build options.

Running and debugging

YACReader needs to find its dependencies at runtime, make sure that Qt binaries are in your PATH and the third-party binaries are next to the executable. The best way to make sure you have all the third-party binaries in place is to check YACReader installation and copy the binaries in your output folder.

Code Format

YACReader uses clang-format to ensure a common style and avoid deviances from it. CI checks this and will fail if the correct format is not used. clang-format needs to be called recursively in all the folders because some of them have their own .clang-format file, mainly to exclude changing the format in third-party libraries which are included in the source code. I recommend configuring your development tools to use clang-format, you can try to use it manually, but please, do it always before committing changes. I recommend using QtCreator configured properly, you can find a tutorial here.

CI/CD

Any PR will be validated through CI, and it will not be merged if CI fails.

Pull Requests

The base and target branch for any PR should always be develop.

Donations

YACReader is free but it needs money to keep being alive, so please, if you like YACReader, visit the home page and make a donation.

Hacktoberfest

If you are interested in YACReader, please contact me so we can discuss your next steps.

Sponsors

Free code signing on Windows provided by SignPath.io, certificate by SignPath Foundation

About

YACReader fork with an option to open finished comics from the first page instead of their last page

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages