Skip to content

GUI

gui

The main gui implementation.

Classes:

MainWindow

MainWindow(filmstocks)

Bases: QMainWindow

The main window of raw2film.

Methods:

Attributes:

  • auto_lens_correct –

    Whether to toggle lens correction automatically when loading a new image.

  • camera_selector –

    Select camera model for lens correction.

  • color_masking –

    How effective the orange color mask of the film is. Value of 1 perfectly

  • flip_button –

    Switch between horizontal and vertical orientation.

  • grain –

    Unchecked: No film grain.

  • grain_intensity –

    Multiplier for grain intensity (0..2).

  • grain_sigma –

    Variance of simulated film grains. Effects perceived uniformity.

  • grain_size –

    Size of simulated film grains.

  • halation –

    Activate halation, a warm glow around highlights, resulting from reflections on

  • halation_green –

    How red or yellow the halation is. Specifies how strongly the halation reaches

  • halation_size –

    How far the halation spreads. Halation is a warm glow around highlights,

  • idealized_curve –

    Replace the characteristic curve of the print film with an ideal gamma curve.

  • info_update –

    The UI has updated.

  • inversion_gamma –

    The gamma applied using the inversion if 'Inversion' is selected or when

  • lens_correction –

    Correct lens distortion and vignetting.

  • lens_selector –

    Select lens model for lens correction.

  • profile_selector –

    Select the profile specifying film and format parameters.

  • projector_kelvin –

    Under what light temperature to view the print or slide.

  • push_pull –

    How much to push or pull the film, adjusting contrast. Works linearly scaling

  • shadow_comp –

    Specify black compensation. For positive values blacks are lifted with a film

  • sharpening_sigma –

    Sigma used for the sharpening kernel (controls radius).

  • sharpening_strength –

    Amount of sharpening to apply (0 - no sharpening, 1 - full).

  • sharpness –

    Emulate the resolution and micro-contrast of film.

  • white_balance –

    Whether to white balance slide film.

  • white_clip –

    When viewing print film brightness will be increased to clip at exactly 1.0.

auto_lens_correct instance-attribute

auto_lens_correct = QAction('Auto lens correct', self)

Whether to toggle lens correction automatically when loading a new image.

camera_selector instance-attribute

camera_selector = WideComboBox(self)

Select camera model for lens correction.

color_masking instance-attribute

color_masking = Slider(continuous=False)

How effective the orange color mask of the film is. Value of 1 perfectly compensates for color layer cross contamination. An increased value leads to higher saturation. There is no documented data on this, so you can play around with this to your liking.

For film without a color mask like slide film this can be used to simulate other inter-layer effects. Should probably set lower, but should be experimented with.

flip_button instance-attribute

flip_button = AnimatedButton(parent=self)

Switch between horizontal and vertical orientation.

grain instance-attribute

grain = QCheckBox()

Unchecked: No film grain. Partially Checked: Monochromatic film grain. Checked: Monochromatic film grain.

grain_intensity instance-attribute

grain_intensity = Slider(continuous=False)

Multiplier for grain intensity (0..2).

grain_sigma instance-attribute

grain_sigma = Slider(continuous=False)

Variance of simulated film grains. Effects perceived uniformity.

grain_size instance-attribute

grain_size = Slider(continuous=False)

Size of simulated film grains.

halation instance-attribute

halation = QCheckBox()

Activate halation, a warm glow around highlights, resulting from reflections on the back of the film.

halation_green instance-attribute

halation_green = Slider(continuous=False)

How red or yellow the halation is. Specifies how strongly the halation reaches into the green sensitive layer.

halation_size instance-attribute

halation_size = SliderLog(continuous=False)

How far the halation spreads. Halation is a warm glow around highlights, resulting from reflections on the film backing.

idealized_curve instance-attribute

idealized_curve = QCheckBox('Pure curve')

Replace the characteristic curve of the print film with an ideal gamma curve. Preserves the sensitivity and dye densities of the print film. When activated, the gamma is controlled by the inversion gamma.

info_update class-attribute instance-attribute

info_update = pyqtSignal(dict, str, str)

The UI has updated.

inversion_gamma instance-attribute

inversion_gamma = Slider(continuous=False)

The gamma applied using the inversion if 'Inversion' is selected or when 'idealized curve' is checked.

lens_correction instance-attribute

lens_correction = QCheckBox()

Correct lens distortion and vignetting.

lens_selector instance-attribute

lens_selector = WideComboBox(self)

Select lens model for lens correction.

profile_selector instance-attribute

profile_selector = WideComboBox(parent=self)

Select the profile specifying film and format parameters. (1-9: select profile)

projector_kelvin instance-attribute

projector_kelvin = SliderLog(continuous=False)

Under what light temperature to view the print or slide.

push_pull instance-attribute

push_pull = Slider(continuous=False)

How much to push or pull the film, adjusting contrast. Works linearly scaling the characteristic curve of the film. Not based on measured data, but a rough approximation, useful for controlling contrast.

Not recommended for use with slide film.

shadow_comp instance-attribute

shadow_comp = Slider(continuous=False)

Specify black compensation. For positive values blacks are lifted with a film like curves. For negative values shadows are darkened without crushing any details.

sharpening_sigma instance-attribute

sharpening_sigma = Slider(continuous=False)

Sigma used for the sharpening kernel (controls radius).

sharpening_strength instance-attribute

sharpening_strength = Slider(continuous=False)

Amount of sharpening to apply (0 - no sharpening, 1 - full).

sharpness instance-attribute

sharpness = QCheckBox()

Emulate the resolution and micro-contrast of film.

white_balance instance-attribute

white_balance = QCheckBox('WB')

Whether to white balance slide film.

white_clip instance-attribute

white_clip = QCheckBox('Clip')

When viewing print film brightness will be increased to clip at exactly 1.0. When viewing slide film white balancing is applied, so that a gray patch will actually produce the color temperature specified by the projector kelvin.

reload_lens_cam_data

reload_lens_cam_data()

Enable lens correction for the current image and try to reload camera and lens data from metadata. Updates image params and triggers a re-render.

show_shortcuts_dialog

show_shortcuts_dialog()

Show the shortcut dialog.

toggle_auto_lens_correction

toggle_auto_lens_correction(checked)

Persist whether to auto-toggle lens correction for newly loaded images.

toggle_full_preview

toggle_full_preview(checked)

Persist full-preview choice and update the preview.

The full preview action previously only triggered a parameter update but did not persist the user choice across sessions. Store the state in QSettings so it can be restored on startup.

toggle_gpu_processing

toggle_gpu_processing(checked)

Called when the GPU rendering action is toggled. Persist the choice and recreate the rendering context so it takes effect immediately.

toggle_half_res_preview

toggle_half_res_preview(checked)

Persist half-resolution preview choice and update the preview.

update_window_title

update_window_title(image_path: str | None = None)

Update the window title to show the currently selected image filename.