HomeProjectsPinax
Viewer

Pinax

An image viewer for one folder at a time: the newest picture large, the rest in justified rows around it, a comic reader, and a small browser that saves a page's pictures as a comic book.

Working; experimental until 1.0
pinax
Business Source License, GPL-3.0 from 1 May 2033
GTK 4libadwaitaOdinWebKitGTK
Amber Linux
pinax

Pinax shows one folder of pictures at a time. The main picture sits large and the rest fill justified rows around it, the way a photo book lays out a spread. Moving the pointer over the rows magnifies what is under it, and opening a picture gives a viewer with fit, fill, one-to-one, zoom and a slideshow.

It was made for Amberlin, who saves the pictures she generates into ~/Pictures/Amberlin as she makes them. In watch mode Pinax notices each new file and moves it into the large slot, so the newest picture is always the one in front of you.

Prompts, kept or removed

Pictures from image generators carry the prompt and settings that made them. Pinax shows what Forge, AUTOMATIC1111 and ComfyUI write into a file beside the picture, and removes it in one step before a picture is shared.

A comic reader

Press C, or start it with --reader, and a folder of scans becomes a comic book: one page or two, in order, at the size of the window, right to left for manga, with a progress rail. A .cbz file opens that way on its own. It reads a book of a thousand pages without holding it all in memory: a 1.08 GB archive of 1,012 pages peaked at 735 MB with the default memory budget, and at 368 MB with a smaller one. It follows the budget, not the size of the file.

A browser for one job

There is also a small browser, for saving the pictures of a web page as a comic book. It keeps nothing: no logins, no history, no downloads beyond the book it is making. Every start is a fresh session. It is deliberately not a general web browser, with tabs, bookmarks or saved logins.

Vim keys work everywhere, and ? lists them.

pinax ~/Pictures          # a folder
pinax --watch ~/Output    # keep the newest in front
pinax --reader book.cbz   # a comic book

How it is built

Pinax is written in Odin on GTK 4 and libadwaita, and draws everything through GTK’s own renderer. The layout, the magnifier, the springy transitions and the texture cache are plain Odin, because no library does this arrangement of justified rows around one large picture. Picture metadata comes through gexiv2, and the browser is WebKitGTK.

Linking WebKit adds 42 shared libraries and about 9 ms to start-up, which the browser is worth. A new 1024 by 1024 PNG takes 234 ms to save at compression level 6 and 2.7 s at level 9, so new pictures are saved at 6. A picture it rewrites keeps the level it already had.

Install

Once the Amber Linux archive is set up (it takes three commands, on the packages page):

bash
sudo apt install pinax