Skip to content

Dodge and Burn brush modes - #193

Open
rezaularif wants to merge 1 commit into
robbietilton:mainfrom
rezaularif:dodge-burn
Open

rezaularif wants to merge 1 commit into
robbietilton:mainfrom
rezaularif:dodge-burn

Conversation

@rezaularif

Copy link
Copy Markdown

Adds Dodge and Burn as Brush modes: Dodge lightens and Burn darkens the pixels under the stroke. Closes #169.

What's added

  • Two new Brush modes beside Paint and Erase.
  • Range (Shadows, Midtones or Highlights) and Exposure (0–100%) in the Brush bar.
  • Overlapping dabs build up to the stroke's strength and never past it. Alpha is left alone, so transparent pixels stay transparent.
  • As [Feature] Add Dodge and Burn Brush Modes #169 asks: a mask as the target is refused with a message, and a stroke that changes nothing, or one at 0% exposure, leaves no undo step.

How to use

  • Pick the Brush (B) and choose Dodge or Burn in the mode picker. Tab steps through Paint, Erase, Dodge and Burn.
  • Set Range and Exposure in the bar, then paint. Size, hardness, opacity, smoothing, the selection and Shift-click straight lines work as they do for Paint.
  • Each stroke is one undo step, named Dodge or Burn.

Tests

  • DodgeBurnTests. The full suite passes, and the project format is unchanged.
  • The same stroke across a 4000 × 4000 photo draws each frame in about the same time as Paint: medians of 0.3 ms at 40 px and about 2 ms at 800 px.

Two more Brush modes beside Paint and Erase, as Photoshop's Dodge and Burn
tools: Dodge lightens and Burn darkens the pixels under the stroke. Range
picks the shadows, midtones or highlights, each fading out smoothly into
the other tones, and Exposure (0–100%) sets how far they move. Size,
hardness, opacity, smoothing, the selection and Shift-click lines work as
they do for Paint, and overlapping dabs build up to the stroke's strength
and never past it. Alpha is left alone, so transparent pixels stay
transparent.

A mask as the target is refused with a message, as they tone a layer's
pixels, and a mask shown on the layer doesn't limit them. A stroke that
changes nothing, or one at 0% exposure, leaves no undo step. Closes robbietilton#169.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add Dodge and Burn Brush Modes

1 participant