#25 - Basic adjustments and a crop on a converted negative #27

Merged
eliott merged 7 commits from feat/25-negative-adjustments into main 2026-11-18 23:45:54 +01:00
Owner

Sits on top of the pull request for #15 (the conversion of negatives): merge that one first.

This is a beta of these features. How they work underneath is done and gives good results; where things are placed in the Convert tab and how they are used can still change.

Once a negative is converted, six adjustments change its positive without leaving the app: black point, white point, warmth, tint, saturation and brightness. Each one has a slider, a value that can be typed from -100 to 100, and an arrow that puts it back. Each negative of the list keeps its own.

The Convert tab also gets a group, Crop to the frame, with two switches: one shows only the frame on the screen, the other keeps only the frame in the saved file. What each group is about now shows when the info button beside its title is pointed at.

This is the last pull request of what ships as 0.4.0: it carries the version bump.

Closes #25

How it works

  • The adjustments act on the positive, after the levels: anything done on the negative acts backwards, and a white balance changed there is undone by the levels.
  • Warmth, tint and brightness are powers counted between the picture's black and its white, so those two stay where they are and only the mid-tones move.
  • Saturation is there for what the conversion does not do: with no colour profile of the camera, colours come out less saturated than they were.
  • The base, the frame and the clipping stay shared by the whole list; the adjustments are forgotten when the app is quit, like the list.
  • rollscan convert takes the same six, from -1 to 1.

Tested

  • cargo test: 293 passed.
  • One colour negative (CineStill 800T, Fujifilm X-T5) converted with and without warmth, saturation and brightness, and looked at.
  • The sliders used by the maintainer in the AppImage on Linux.

Not tested

  • The typed values, the arrows, the info buttons and the two switches were not driven by an automated test of the page, and were added after the maintainer last tried the sliders.
  • Windows and macOS.

Changes in behaviour

  • "Keep only the frame in the saved file" is no longer a checkbox under Conversion: it is the switch "In the saved file" under Crop to the frame. It is still on to begin with.
**Sits on top of the pull request for #15 (the conversion of negatives): merge that one first.** **This is a beta of these features.** How they work underneath is done and gives good results; where things are placed in the Convert tab and how they are used can still change. Once a negative is converted, six adjustments change its positive without leaving the app: black point, white point, warmth, tint, saturation and brightness. Each one has a slider, a value that can be typed from -100 to 100, and an arrow that puts it back. Each negative of the list keeps its own. The Convert tab also gets a group, Crop to the frame, with two switches: one shows only the frame on the screen, the other keeps only the frame in the saved file. What each group is about now shows when the info button beside its title is pointed at. This is the last pull request of what ships as 0.4.0: it carries the version bump. Closes #25 ## How it works - The adjustments act on the positive, after the levels: anything done on the negative acts backwards, and a white balance changed there is undone by the levels. - Warmth, tint and brightness are powers counted between the picture's black and its white, so those two stay where they are and only the mid-tones move. - Saturation is there for what the conversion does not do: with no colour profile of the camera, colours come out less saturated than they were. - The base, the frame and the clipping stay shared by the whole list; the adjustments are forgotten when the app is quit, like the list. - `rollscan convert` takes the same six, from -1 to 1. ## Tested - `cargo test`: 293 passed. - One colour negative (CineStill 800T, Fujifilm X-T5) converted with and without warmth, saturation and brightness, and looked at. - The sliders used by the maintainer in the AppImage on Linux. ## Not tested - The typed values, the arrows, the info buttons and the two switches were not driven by an automated test of the page, and were added after the maintainer last tried the sliders. - Windows and macOS. ## Changes in behaviour - "Keep only the frame in the saved file" is no longer a checkbox under Conversion: it is the switch "In the saved file" under Crop to the frame. It is still on to begin with.
- the window no longer scrolls: each panel scrolls on its own
- the arrows move the film by a length picked from 0.25 to 10 mm
- the picture zooms with the wheel, the buttons or + and -, and drags
- the keyboard drives the film, the zoom and the scan; ? lists the keys
- a file name can be given apart from the roll's name
- Check framing is hidden when the camera has a live view
- neutral greys instead of warm stone, with the accent on what is selected
- errors show as toasts, questions in the app's own dialog
- the empty viewer says what is missing, under a strip of film
rollscan convert reads a RAW file as the sensor measured it, divides it by
the film's base, goes to densities, stretches each channel between its own
percentiles, renders the result as a print or as the scene's light, and
saves a 16-bit sRGB TIFF. The method and what it leaves out are in
docs/negative-conversion.md.

RAW files are read with rawler (LGPL-2.1).
A Convert view beside the scan: RAW files are handed to the app, each shows
as a positive, and the film's base and the frame are drawn on the picture.
The base is measured once and serves for every negative in the list. The
positives are saved as 16-bit TIFF files where the scans go.
The window receives the files, not the page: it now tells the page where
they are, and the app reads them there, without a copy. Dropping files
opens the Convert view.
Adding or picking a negative no longer converts it: it shows as shot, the
film's base and the frame are drawn on it, and Convert turns it into a
positive. The base drawn on a negative still shown as shot is measured at
once, so that it serves for the others.
A click on bare film measures a small square around it: a few thousand
pixels, whose median neither grain nor dust moves.
The density and the print curve are replaced: the film's base gives the white
balance, the balanced value is inverted by its reciprocal, encoded with a square
root, and each channel is stretched between its own black and white points,
measured on the frame shrunk four times.

The rendering choice is gone and the clipping is set apart for the shadows and
the highlights, in the app and in rollscan convert (--clip-shadows,
--clip-highlights; --black and --white are levels from 0 to 1).
The levels were measured on the picture shrunk four times, which is the size of
the copy looked at only for sensors about 8000 pixels wide: on others the
positive shown and the one saved did not get the same black and white points.
They are now measured on the picture shrunk until its long side is 2000 pixels
at most, which is that copy, on blocks that fall at the same places in both.

The frame drawn is rounded inward on the small copy, so that a pixel half on
the film holder stays out of it. A black or white point given by hand is no
longer moved when the frame is flat: the measured one is.
A rectangle drawn roughly is put right afterwards: dragging inside it moves it,
dragging an edge or a corner resizes it, and the pointer shows which. Starting
outside it draws another, as before.
Six sliders under Adjustments act on the positive shown, and each negative of
the list keeps its own: black point, white point, warmth, tint, saturation and
brightness. A double click on one, or Reset adjustments, puts it back. The saved
file is what the screen shows.

rollscan convert takes the same six as options, from -1 to 1.
Brightness, warmth and tint raised each value to a power counted from 0, while
the picture's black sits a little above: its blacks turned grey as soon as
brightness went up, and red with warmth. The powers are now counted between the
black and the white targets of the levels, which stay where they are.

The sliders are held while the positives are being saved.
Each adjustment shows its value, from -100 to 100, in a field that can be typed
in, and has its own arrow to put it back to none. What each group of the Convert
tab is about is no longer written under it: it shows when the info button beside
its title is pointed at or has the keyboard.
Keeping only the frame in the saved file was a checkbox at the end of the
conversion's settings, easy to miss. It is now a switch under Crop to the frame,
beside a second one that shows only the frame on the screen, as it will be kept.
Nothing is drawn or moved on the picture while only the frame shows.
eliott merged commit 065c296a13 into main 2026-11-18 23:45:54 +01:00
eliott deleted branch feat/25-negative-adjustments 2026-11-18 23:45:54 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
RollNote/rollscan!27
No description provided.